lscache_wp icon indicating copy to clipboard operation
lscache_wp copied to clipboard

Undefined index: HTTP_REFERER - Problem with "Referrer-Policy" in .htaccess

Open camya opened this issue 4 years ago • 0 comments

I run in a problem when I use the "Purge All" feature from frontend. The site stops with a white screen.

The error is: Undefined index: HTTP_REFERER (/wordpress/wp-content/plugins/litespeed-cache/src/admin.cls.php on line 167) .... wp_redirect( $_SERVER[ 'HTTP_REFERER' ] );

Reason for this error?

For security I use an .htaccess firwall, which sets the "Referrer-Policy" to "no-referrer". Because of this, there is no HTTP_REFERER to redirect and the site stops with the Undefined index: HTTP_REFERER.

<IfModule mod_headers.c>
    Header set Referrer-Policy "no-referrer"
</IfModule>

camya avatar Jun 16 '20 11:06 camya