Hit-for-pass on 403s

Difficulty level: Beginner


This challenge includes two requests. The first will yield a 403 (forbidden) response from the origin. Because of the VCL code in vcl_fetch, this will result in a PASS. The subsequent request is identical to the first. Because the response to the first request wasn't cached, the second one will, like the first, trigger a fetch to the origin. However, the second request could avoid the cache lookup (and therefore avoid the bottleneck of request collapsing), if we knew that this URL path had recently produced a non-cacheable response from origin, and therefore is not worth looking up in the cache.

Modify the code to ensure that a hit-for-pass is created on the initial 403 response.

Try this challenge now

For a guide to how challenges work see getting started.