Skip to content

Commit a67117b

Browse files
reithorvidarlmnocon
committed
Fastly: Fixed basic auth snippet (#2636)
* Fixed basic auth snippet * Update docs/infrastructure_and_maintenance/cache/http_cache/fastly.md Co-authored-by: Vidar Langseid <[email protected]> * Update docs/infrastructure_and_maintenance/cache/http_cache/fastly.md Co-authored-by: Marek Nocoń <[email protected]> --------- Co-authored-by: Vidar Langseid <[email protected]> Co-authored-by: Marek Nocoń <[email protected]>
1 parent b9273e7 commit a67117b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/guide/cache/fastly.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ if (fastly.ff.visits_this_service == 0 && req.restarts == 0) {
463463
error 401 "Restricted";
464464
}
465465
}
466+
467+
# Unsetting req.http.Authorization to avoid reaching "return(pass)" in vcl_recv for the first ESI request
468+
if (req.is_esi_subreq) {
469+
unset req.http.Authorization;
470+
}
466471
```
467472
468473
To enable basic-auth for one domain only, alter `snippet_basic_auth_recv.vcl`:

0 commit comments

Comments
 (0)