Can't login with varnish enabled
-
06-11-2019 - |
Question
I can't login from the front-end with varnish installed. Here's what I think it is issue
sub vcl_recv {
# Do not cache these paths.
if (req.url ~ "^/status\.php$" ||
req.url ~ "^/admin$" ||
req.url ~ "^/admin/.*$" ||
req.url ~ "^/admin/?" ||
req.url ~ "^/user" ||
req.url ~ "^/user/.*$" ||
req.url ~ "^/users/.*$") {
return (pass);
}
and the session cookies
if (req.http.Cookie) {
set req.http.Cookie = ";" + req.http.Cookie;
set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";");
set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[a-z0-9]+|NO_CACHE)=", "; \1=");
set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[a-z0-9]+|SSESS[a-z0-9]+|NO_CACHE)=", "; \1=");
If I try to login directly from apache port:8000 it works as expected. Here's the whole default.vcl file: http://pastebin.com/qPRyFEjP
I don't get why it's not piping to the authenticated users. Why wouldn't it login in? Thanks.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange