Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static files are sometimes not delivered via fastly #591

Closed
tripodsan opened this issue Feb 27, 2019 · 0 comments
Closed

static files are sometimes not delivered via fastly #591

tripodsan opened this issue Feb 27, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@tripodsan
Copy link
Contributor

see https://github.com/adobe/developer.adobe.com/issues/133

I think the main problem is, that the 404 from the html action is cached, and then the vlc_hit doesn't restart the request for invoking the static action.

I believe that the improvements of adobe/helix-publish#7 would address this issue. in the mean time, a quick workaround is to ensure the 404 is not cacheable:

sub vlc_fetch {
...
  } elseif ((beresp.status == 404 || beresp.status == 204) && !req.http.X-Disable-Static) {
    # That was a miss. Let's try to restart.
    set beresp.http.X-Status = beresp.status + "-Restart " + req.restarts;
    set beresp.status = 404;
    # ensure that 404 from the backends are not cached. otherwise the a potential vlc_hit will not re-fetch the static files.
    set beresp.cacheable = false;    
...
@tripodsan tripodsan added the bug Something isn't working label Feb 27, 2019
trieloff pushed a commit that referenced this issue Feb 27, 2019
* static files are sometimes not delivered via fastly #591

* add action name to trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant