Force my heroku app to use SSL (https)

前端 未结 9 1151
栀梦
栀梦 2020-11-30 03:42

I have a node app running successfully on Heroku. I have purchased an Expedited SSL certificate and it all works fine. I go to https... and get a full \'green bar\' proving

9条回答
  •  情深已故
    2020-11-30 04:29

    If you are developing a creat-react-app and happened to use create-react-app-buildpack to deploy to Heroku (I'm lazy...)

    You can specify the following in your static.json file

    {
      "https_only": true
    }
    

    https://github.com/mars/create-react-app-buildpack#user-content-https-only

提交回复
热议问题