Heroku Config Secret Key Base Error

后端 未结 3 1299
迷失自我
迷失自我 2020-12-07 18:57

Just pushed my first app to Heroku using Git and straight away got an Interanl Server Error.

You must set config.secret_key_base in your app\'s config.

3条回答
  •  借酒劲吻你
    2020-12-07 19:51

    Its best to use an ENV variable for this..

    This way you can invalidate all the cookies quickly if needed, have a separate secret per environment and no need to deal with the file in a special way

    heroku config:set SECRET_TOKEN=ertbs45tnsb3aw5bsxdrt54...
    

    if you duplicated the app or have another app setup in heroku, each app will have its own secret_token. on your localmachine just setup the same variable

提交回复
热议问题