Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 627 Bytes

File metadata and controls

16 lines (12 loc) · 627 Bytes

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]