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
[WIP] Get the real protocol behind several proxies #11157
Conversation
@LukasReschke your thoughts? |
*/ | ||
public static function serverProtocol() { | ||
if(OC_Config::getValue('overwriteprotocol', '') !== '' and self::isOverwriteCondition('protocol')) { | ||
return OC_Config::getValue('overwriteprotocol'); | ||
} | ||
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) { | ||
$proto = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']); | ||
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], ",") !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single quotes
Will test later. |
Works - tested 👍 |
@owncloud-bot This is ok to test. |
@owncloud-bot Retest this please. |
🚀 Test Passed. 🚀 |
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
I put this contribution under the MIT license. |
Please rebase. |
Would be good to have a unit test for that. |
X-Forwarded-Proto contains a list of protocols if ownCloud is behind multiple reverse proxies.
A new inspection was created. |
Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
I put this contribution under the MIT license. |
I'm still okay with this contribution. @MorrisJobke Care to review this? |
@Romua1d No worries, all fine. Our bot is just somewhat buggy in moment due to, well, no idea, it just doesn't work sometimes ;-) Thanks for your contribution!!! |
I'll revive this one. |
X-Forwarded-Proto contains a list of protocols if ownCloud is behind multiple reverse proxies. This is a revival of #11157 using the new IRequest public API.
Replaced by #14458 |
X-Forwarded-Proto contains a list of protocols if ownCloud is behind multiple reverse proxies.