Skip to content

Commit

Permalink
flask secret key initialization using an env variable (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
alok760 authored and xeon-zolt committed Mar 14, 2019
1 parent 5fec258 commit 35a2bb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

# Initialize the Flask application
app = Flask(__name__)
app.secret_key = b'_5#y2L"F4Q8z\n\xec]/'

# Initializing flask secret key using the environment variable "secret_key"
app.secret_key = os.environ.get('secret_key', 'z528&^FJjhd_t2bxc#$2').encode()

# This is the path to the upload directory
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
Expand Down

0 comments on commit 35a2bb7

Please sign in to comment.