kpcyrd <[email protected]> on Mon, 2022/09/26 17:47: > On 9/19/22 14:52, Christian Hesse wrote: > > In nginx this can be achived by > > adding a single directive in location block: > > > > add_header Cache-Control "no-cache"; > > If it's added directly to the location block this would disable caching > for all responses.
Yes, true... Though pacman ignores this. :)
And I found another issue: By default nginx does not add headers
when return code is 404, but it can be forced with extra parameter
"always" [0].
So we should show something like this in the commit message for a complete
server block:
server {
server name _default;
listen 8080;
root /var/cache/pacman/pkg;
error_page 404 = @no-cache;
location @no-cache {
add_header CacheControl "no-cache" always;
}
}
Allan, if you decide to accept the patch I would like to re-send with an
updated commit message.
[0] https://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];)
putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
pgpPR0jUyiS2E.pgp
Description: OpenPGP digital signature
