-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
HTTPS required message is displayed even when using HTTPS if dashboard is deployed to Heroku. #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We've focused primarily on the |
Thanks @drew-gross Since it is just for testing, I am not worried about the Master Key. I removed that preinstall script, created a Procfile to run "npm run dashboard" and I changed environment on Heroku to development with "heroku config:set NPM_CONFIG_PRODUCTION=false". Then add my Parse Server info into parse-dashboard-config.json The server is now running at https://parse-dashboard-1.herokuapp.com/ But even the web is running on HTTPS, it is still showing that the dashboard needs to be accessed via HTTPS |
The dashboard requires your connection to server to be HTTPS. Heroku may be doing some early SSL termination, resulting in the connection to your dashboard not being HTTPS. You can allow insecure connections by digging into the source of I would also happily accept a PR that adds a config option to allow non HTTP requests for people who are doing early SSL termination. |
It's most likely that heroku is handling the ssl termination and the node express server is on HTTP. client <---- HTTPS -----> heroku <--- HTTP ---> parse-dashboard. The requests coming to parse-dashboard are likely to be http requests from heroku proxy/load balancer/reverse proxy. From there you have multiple options
|
you can for now comment out line 33 in the Parse-Dashboard/index.js. This will bypass that check and allow you to continue setting it up for now while you work out SSL |
I figured it out. It seems Heroku doesn't terminate SSL but the app itself doesn't feel secure running behind the proxy. What I did is adding this statement app.enable('trust proxy'); at line 13. And that's it. I can confirm this works for Heroku and Dokku |
Note that the 'trust proxy' line causes express to trust the request headers, which can be spoofed by an attacker. If you are doing this, make sure to have a username and password enabled for your dashboard, and make sure you are only entering the username and password over https. (The auth is HTTP Basic Auth so if you enter your password over http, your password will be transmitted in clear-text) |
Replacing this issue with #54 |
I basically cloned the repo and pushed it to Heroku. First, there was an error that Node version wasn't specified. I added Node version in package.json. Then there is this error
remote: > @ preinstall /tmp/build_59a48c67353dd6c9057be7bd1698879f
remote: > git update-index --skip-worktree Parse-Dashboard/parse-dashboard-config.json
remote:
remote: fatal: Not a git repository (or any parent up to mount point /tmp)
Does it need to be deployed another way?
The text was updated successfully, but these errors were encountered: