Skip to content

Commit a913e86

Browse files
reithorvidarlmnocon
authored
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 4780b64 commit a913e86

File tree

1 file changed

+5
-0
lines changed
  • docs/infrastructure_and_maintenance/cache/http_cache

1 file changed

+5
-0
lines changed

docs/infrastructure_and_maintenance/cache/http_cache/fastly.md

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

0 commit comments

Comments
 (0)