XF 2.0 Log in problems with litespeed cache enabled

Status
Not open for further replies.

Wayne T1

Member
Hi,

Hoping someone can help. As per the thread title when I enable litespeed cache, users are getting errors when trying to log in from pages that are served from the cache. If a page is served from the cache and another user trys to log in from the cached page, they receive the following error message:

"Security error occurred. Please press back, refresh the page, and try again."

I am using LiteSpeed Cache for XF2.

With this code in .htaccess

Code:
# LiteSpeed XenForo cache
        <IfModule litespeed>
            CacheLookup public on
            RewriteEngine On
             # cache
             RewriteCond %{HTTP_COOKIE} !xf_user [NC]
             RewriteRule .* - [E=Cache-Control:max-age=360]
             # no cache
             RewriteCond %{HTTP_COOKIE} xf_user [NC]
             RewriteRule .* - [E=Cache-Control:vary=loggedin]
             RewriteCond %{HTTP_COOKIE} xf_user [NC]
             RewriteRule .* - [E=Cache-Control:no-cache]
        </IfModule>

Yes my cookie names are correct. Anybody any idea on how to solve this as I really want the pages cached.

TIA
 
Back
Top Bottom