Roots Discourse

Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress

Hello,

I am using centos webserver with php8, varnish and nginx. Normal wordpress installations works fine. I have just installed bedrock on my webserver provided nginx configuration on the documents. Frontend website looks good, but when i am trying to authenticate i receive:

Error : Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

Bedrock website is on development configuration. Any suggestions?

Could be Varnish… Or maybe try setting your COOKIE_DOMAIN const?

See this StackExchange post.

I have updated COOKIE_DOMAIN but this does not seem to resolve my issue. Is bedrock using any special cookies for authentication?
I am asking because authentication working in all normal wordpress installations. So my varnish config works good for normal wp.

Bedrock is not a normal WordPress installation so I would first check your Varnish config with regards to this. That being said: I am no expert on Varnish at all, just wanted to chip in…

so the issue was on vcl_backend_response

Only allow cookies to be set if we’re in admin area

    if (beresp.http.Set-Cookie && bereq.url !~ "^/wp-(login|admin)" && bereq.url !~ "((wp/)?wp-(login|admin)|login)") {
            unset beresp.http.Set-Cookie;
    }