0

Preconditions (*)

  • Magento 2.4.2
  • Varnish 6
  • SSL enabled

Steps to reproduce (*)

  • Configure magento to use varnish cache.
  • Sign In and browse some pages. Then Sign out.

Expected result (*)

  • After sign-out, the link should remain displaying sign-in till the user logs in.

Actual result (*)

  • After logout success page, when page redirects to home page the sign out link shows out there instead of sign in link

The issue is only coming when varnish cache is enabled. I've tried with existing solution available over the google, but none of them worked for me.

Can anyone please help me with how to fix this issue. Thanks in advance!

2
  • Please include your VCL file and provide the endpoint of the component that displays the sign out link. I'm assuming this endpoint will be processed as an Edge Side Include in Varnish, but please confirm the full URL of this endpoint. Based on this information I'll provide some varnishlog command that you can run to figure out why Varnish behaving this way. Sep 29, 2021 at 12:49
  • @ThijsFeryn Will include the vcl file in the question, once I get it from our hosting provider. Sep 30, 2021 at 5:18

1 Answer 1

0

The issue was due to the domain on which the issue was coming was not added to varnish container by hosting provider. As we are on multi-website they have only configured varnish for primary domain.

After changes made from their end the issue is gone and it is working as expected now. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.