Skip to content

szepeviktor/cookieyes-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CookieYes local

Serve cookie banner from local cache instead of the CDN of CookieYes.

Alternative routing

If you don't want to start WordPress again.

RewriteEngine On
RewriteCond "%{DOCUMENT_ROOT}/wp-content/uploads/cookieyes-local.js" -f
RewriteRule "^client_data/([^/]+)/script\.js$" "/wp-content/uploads/cookieyes-local.js" [END,E=COOKIEYES_LOCAL:1]
Header set Cache-Control "public, max-age=600, must-revalidate" env=COOKIEYES_LOCAL
# Otherwise redirect the request to the original CDN
RewriteRule "^client_data/([^/]+)/script\.js$" "https://cdn-cookieyes.com/client_data/$1/script.js" [R=temp,END]