Created
April 3, 2020 01:41
-
-
Save marcofbb/e3e22be8f6b9db2b78524a245123a874 to your computer and use it in GitHub Desktop.
Varnish remove GET parameters Cloudflare under attack challange
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in vcl_recv | |
if (req.url ~ "(\?|&)(__cf_chl_jschl_tk__)=") { | |
set req.url = regsuball(req.url, "&(__cf_chl_jschl_tk__)=([A-z0-9_\-\.%25]+)", ""); | |
set req.url = regsuball(req.url, "\?(__cf_chl_jschl_tk__)=([A-z0-9_\-\.%25]+)", "?"); | |
set req.url = regsub(req.url, "\?&", "?"); | |
set req.url = regsub(req.url, "\?$", ""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment