shopware5 / shopware

Shopware 5 core
https://shopware.com
Other
1.32k stars 808 forks source link

HTTPS detection broken via http-proxy #65

Closed sbias closed 11 years ago

sbias commented 11 years ago

If somebody comes via a http-proxy server which sends the x-forfarded-for header shopware thinks it is https. We created at Emotion Page and placed a Banner Slider on it. The Images in this Banner Slider are filtered by the Output Filter Plugin to https:// The Server actualy did not run under https but was behind a reverse Proxy / Load Balancer (Apache mod_proxy). The Problem was finaly found inside engine/Shopware/Plugins/Default/Core/Router/Bootstrap.php#162

if (($host = $request->getHeader('X_FORWARDED_HOST')) !== null && $host === $shop->getSecureHost() ) {

I think its better to set the https-header in the proxy-server and remove the line in the code (if you use a reverse-proxy for https). thanks to Rene for helping to solve this issue ;) Greetings Sascha.

OliverSkroblin commented 11 years ago

Hi,

we will verify the issue as soon as possible. You can trace the process in our public issue tracker: http://jira.shopware.de/?ticket=SW-6744