HTTPS-only does not work
j4nos opened this issue · 3 comments
j4nos commented
mars commented
HTTPS is only supported when deployed to Heroku with this buildpack.
Are you trying to use HTTPS locally? Local create-react-app dev is plain HTTP only.
Otherwise confirm that you’re actually deploying that change. Is the HTTPS config on a branch other than master? If so you may accidentally be deploying the wrong branch. To push a non-master branch to Heroku:
git push heroku other-branch:master
Set other-branch
to your local branch you wish to deploy.
j4nos commented
static.json
{
"root": "build/",
"routes": {
"/**": "index.html"
},
"https_only": true,
"headers": {
"/**": {
"Strict-Transport-Security": "max-age=31557600"
}
}
}
worked
ricardolpd commented
@j4nos I am having a similar issue, but it wont work with Strict-Transport-Security
header either, i noticed your static.json is not in the root folder. Is ur static.json in the same folder as your Procfile
?