This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
Build ESI onerror and alt support into 404 handler? #83
Labels
question
Further information is requested
Give that we post-process most resources that could contain ESI anyway (in
helix-pipeline
orhelix-static
), it might be practical to implement support for thealt
andonerror
through rewritten ESI and modified VCL.<esi:include src="foo.html" alt="bar.html" />
becomes<esi:include src="foo.html?alt=bar.html"/>
When the 404 handler detects that this is an ESI request with an
alt
query string parameter, it will change the URL and restart the request.<esi:include src="foo.html" onerror="continue" />
becomes<esi include src="foo.html?onerror=continue"/>
When the 404 handler detects that this is an ESI request with the
onerror
request parameter, it handle the request depending on the value of theonerror
request parameter:continue
: create an empty synthetic responsestatic
: create a synthetic response that contains the current URL (slightly rewritten, so recreate the required fallback for static)In all other cases, run the standard 404 behavior.
The text was updated successfully, but these errors were encountered: