-
-
Notifications
You must be signed in to change notification settings - Fork 47
Add support for X-Forwarded-Proto to identify HTTPS protocol #520
Add support for X-Forwarded-Proto to identify HTTPS protocol #520
Conversation
Support X-Forwarded-Proto header since it is used in some proxy or load balancer environments to identify HTTPS protocol. More info: developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto
before merging, please update readme.md with a new line into the changelog, eg.
thanks for contributng to this project. |
I've just added the line to the readme.md, thank you for the advice. |
Thanks, but please add the new line at the end of the list |
Sorry, but there is the new line at the end of the list, should I add another one? |
Move your line at the end of the list. We add all change at the end of the list. |
Ah, sorry, didn't get it... done. |
does it is affects nginx? |
@karlsoon : I just checked the commits in this PR, and it doesn't seem nginx was included. There would need to be an additional "if" added in PgCache_Environment.php#1048, but I'm not a big fan of the use of "if's" in nginx (see If is Evil). It'd be something like this:
Warning: I haven't tested it. You can give it a try and let us know if it works. |
Support X-Forwarded-Proto header since it is used in some proxy or
load balancer environments to identify HTTPS protocol - nor HTTPS,
nor SERVER_PORT variable is available in those scenarios to
identify the protocol used.
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto