• Resolved ghosted

    (@ghosted)


    Issue: if example.com homepage/any page has been previously viewed && cached Password Protected doesn’t fire to verify the security cookie exists and the 302 to password protected password entry is bypassed completely.

    Is there any way to have the initial request sent to the sever or have LS Cache check for the existence of the cookie.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please try add this at top of your .htaccess

    <IfModule LiteSpeed>
    RewriteRule .* - [E=Cache-Vary:cookie_name]
    </IfModule>

    change the cookie_name to the cookie you want to have it checked

    and then purge all , and restart webserver if you are using OpenLiteSpeed

    Best regards,

    Thread Starter ghosted

    (@ghosted)

    Unfortunately doesn’t seem to make a difference. Password protected has a default cookie name “bid_1_password_protected_auth”.

    <IfModule LiteSpeed>
    RewriteRule .* - [E=Cache-Vary:bid_1_password_protected_auth]
    </IfModule>

    At the top of .htaccess yielded no results.

    edit: wouldn’t there need to be a rule to bypass the cache with this, from what I’m reading it’s only to detect a cookie it wouldn’t do anything other than that?

    • This reply was modified 3 years, 6 months ago by ghosted.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    this rule will vary the cache , by that saying

    generate one cache for user who has this cookie , and another cache for user who doesn’t have this cookie

    if you remove what you added in previous, then you go to Cache -> Exclude -> Do not cache cookie , add your cookie name there, save and purge all , how does that go ?

    Thread Starter ghosted

    (@ghosted)

    I have it set up to exclude the cookie already as well as the string in the uri identifying the password protected form to enter the password. Those both seem to work. Unfortunately the absence of the “bid_1_password_protected_auth” cookie doesn’t seem to load the password entry page with

    <IfModule LiteSpeed>
    RewriteRule .* - [E=Cache-Vary:bid_1_password_protected_auth]
    </IfModule>

    in the header of .htaccess.
    Is there perhaps a place to add the rewrite rule somewhere in Openlitespeed directly? I haven’t been able to find anything in relation to doing that.

    thx for your continued help.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Did you restart OLS after you edited .htaccess ?

    it won’t take effect in OLS until you restart it

    I have it set up to exclude the cookie already

    what’s the cookie name you excluded ? same as the one in the rule ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘LS Cache + Password Protected’ is closed to new replies.