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
4.4.0 Wrong schema shown in base tag when using ContaoCache #895
Comments
Not knowingly. If no one else has this issue, we can close this for now I think. |
We have the same problems in the backend after installing the Managed Edition 4.4.2 with Contao Manager 0.9. Another installation created with Composer does not show this bug. For more Details please have a look at our post in the user forum |
@dibole Could you please try if the issue disappears if you remove the line |
@ausi We have removed the line as you suggested, but unfortunately the issue does not disappear. Now it is even worse, because now the wrong base href with http appears also in the Contao Login screen. |
After this we made a complete new installation in a new operating system (docker container) with Contao Manager Beta9, @leofeyer but the problem is still there and reproducable. Therefore I hope that this issue will be opened again. |
How exactly can we reproduce the issue? |
Heute haben wir bei der 4.4 Edition, die mit dem Composer installiert wurde, ein Update auf Version 4.4.2 gemacht und nun haben wir dort ebenfalls das Problem, dass die base href im HTML-Header im Backend nach dem Login auf eine unverschlüsselte Domain zeigt und deshalb die CSS-Files nicht geladen werden. Vor dem Login zeigt die base href übrigens noch auf die verschlüsselte Domain). Der Bug liegt also nicht am Contao Manager, sondern muss mit dem Update von 4.4 auf 4.4.2 reingekommen sein. @leofeyer Wir benutzen Apache (Events) und PHP-fpm |
Neue Erkenntnis: Die in Contao verwendete Funktion isSecure von Symfony funktioniert bei der Verwendung eines Proxies nur, wenn diese mittels der Funktion setTrustedProxies definiert wurden -> http://api.symfony.com/2.3/Symfony/Component/HttpFoundation/Request.html#method_isSecure |
dibole is right: setTrustedProxies solves the problem. |
This is exactly the way to go. That's how you have to set trusted proxies in Symfony applications :) |
Just be aware that |
Not ideal. Can this be configured or do we have to adjust our |
You cannot configure that. It is by design that it has to go to your entry point. It used to be a configuration parameter in Symfony but it was deprecated and removed. So for a standard Symfony app, modifying it in |
@xgcssch Maybe you can copy the |
What do you think about adding an environment variable for trusted proxies, so we can set it through the |
Not sure. Why does Symfony not have this option? |
On an HTTPS site the
<base>
tag in the header shows anhttp://
URL.I debugged it and found out that
Environment::get('ssl')
returnsfalse
.The backtrace for the first call to
Environment::ssl()
is:It looks like at this first call the current request returns
false
for->isSecure()
and theEnvironment
class caches this result for all subsequent calls.The text was updated successfully, but these errors were encountered: