Skip to content

Commit 011ff6a

Browse files
authored
Merge pull request #555 from joaooliveirap/rateLimitNotExemptMaintenanceIps
According to your docs -> https://github.com/fastly/fastly-magento2/b…
2 parents d1dbea2 + 130ae76 commit 011ff6a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: etc/vcl_snippets_rate_limiting/recv.vcl

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
if (####RATE_LIMITED_PATHS####) {
2-
set req.http.Rate-Limit = "1";
3-
set req.http.X-Orig-Method = req.method;
4-
set req.hash_ignore_busy = true;
5-
if (req.method !~ "^(GET|POST)$") {
6-
set req.method = "POST";
2+
if (req.http.Fastly-Client-Ip !~ maint_allowlist) {
3+
set req.http.Rate-Limit = "1";
4+
set req.http.X-Orig-Method = req.method;
5+
set req.hash_ignore_busy = true;
6+
if (req.method !~ "^(GET|POST)$") {
7+
set req.method = "POST";
8+
}
79
}
810
}

0 commit comments

Comments
 (0)