0
我正在嘗試部署一個簡單的燒瓶應用。然後我選擇gunicorn和nginx。 但是當我tryed應用程序只是gunicorn運行,出現如下異常:當使用Gunicorn時,燒瓶secret_key不可用,即使它已配置
RuntimeError: the session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret.
init.py
:
if __name__ == '__main__':
app.secret_key = config["secret-key"]
app.run(port=config["port"], host=config["host"], debug=config["debug"])