-
Notifications
You must be signed in to change notification settings - Fork 190
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
[MultiDomainBundle] Replaced host override cookie with session #688
[MultiDomainBundle] Replaced host override cookie with session #688
Conversation
All admin routes (/admin/xx) should never be cached by Varnish. So the host override cookie should work as expected. Or do you have an other use case? |
Varnish doesn't cache the response, so that isn't the problem. This pull request is just another way of overriding the host without removing the underscore which solves my usecase and probably that of others. |
@wimvds What was the reason why you moved from using sessions to cookies? |
09f23d3
to
ba98ff6
Compare
@wimvds ping |
A session was created on every request (because $session->has starts a session when no session is started yet). Putting it inside a $session->isStarted() test did not seem to work (and I didn't have time to find out why). That's why I refactored it to use a cookie instead. |
@yoshz can you rebase please. Using the session is ok for us. It looks like there is some sort of convention that cookies that start with underscores can be removed in Varnish. So, or we remove the underscore, or we use the session. |
cb42826
to
13bfacb
Compare
Done |
@yoshz the tests failed |
Uhh.. I guess someone added tests in meantime :). |
5d0e168
to
54a6847
Compare
54a6847
to
db12498
Compare
All checks have passed! Please merge otherwise I keep rebasing :) |
…toverride [MultiDomainBundle] Replaced host override cookie with session
done :) |
I had a problem with the host override cookie was unset by Varnish because it is prefixed with underscore.
As it is a session cookie it is easy replaced by using the request session instead of an extra cookie.