Incorrect redirect to http instead of https#4341
Incorrect redirect to http instead of https#4341joshmoore merged 6 commits intoome:developfrom atarkowska:missing_schema
Conversation
|
Irrespective of whether this fixes the http/https bug or not it should still be useful for https://trello.com/c/7eFWt9Bj/8-django-secure-proxy-ssl-header |
|
After a lot of testing... No config options set:http and https works as expected:
omero.web.application_server.host set to non-localhost:https is always redirected to http This could be because gunicorn ignores the header for security unless it's specifically enabled as a gunicorn arg http://gunicorn-docs.readthedocs.org/en/19.3/deploy.html#nginx-configuration omero.web.application_server.host set to non-localhost,
|
|
FYI, If you double-quote the IP it doesn't work: |
|
@manics and I were investigating that issue and my comments are in https://github.com/openmicroscopy/management_tools/pull/77#issuecomment-158083311, basically saying the same |
|
To confirm I added docker IP Then added reverse proxy on docker as follow: that gives: |
|
I will also open a PR to allow |
|
Tested a multiple proxy configuration: https://nginx-public-proxy/ -> http://omero-nginx-proxy/ Using the default settings this redirects to http since the internal communication with and setting the new property defined in this PR: Note the header name gets mangled as described in https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header which can be confusing at first. Also json doesn't support Once that's in place, everything works with the two proxies:
So apart from the minor comment about json brackets, this is good to merge. |
There was a problem hiding this comment.
You can't use () in json, [] seems to work
|
@manics thanks for testing, comment updated |
|
Text changes look fine, though I haven't checked it renders correctly. Merge and fix later if necessary? |
|
Filed a card for the follow up: https://trello.com/c/BJnz66v7/89-regenerate-https-docs |
Incorrect redirect to http instead of https
This PR should fix incorrect redirection to
http://instead of https://cc @manics see https://trello.com/c/7eFWt9Bj/8-django-secure-proxy-ssl-header