chore: remove public from Cache-Control header value (#562)

It removes `public` from `Cache-Control` value, leaving max-age=<VALUE>, which can prevent CDN and Basic Authentication issues. See details on #560.

This applies to the "Cache-Control Headers" feature, with no user-breaking changes expected.
This commit is contained in:
Jose Quintana
2025-09-06 09:20:09 +02:00
committed by GitHub
parent a522274430
commit 0b5577085d
5 changed files with 9 additions and 9 deletions

View File

@@ -121,7 +121,7 @@ curl -iH "content-type: application/json" http://localhost:8787
# HTTP/1.1 200 OK
# content-type: application/json
# content-length: 163
# cache-control: public, max-age=86400
# cache-control: max-age=86400
# date: Tue, 11 Oct 2022 23:24:55 GMT
# [{"name":"spécial directöry","type":"directory","mtime":"2022-10-07T00:53:50Z"},{"name":"index.html.gz","type":"file","mtime":"2022-09-27T22:44:34Z","size":332}]⏎

View File

@@ -15,7 +15,7 @@ curl -I -X OPTIONS http://localhost:8787/assets/main.js
# HTTP/1.1 204 No Content
# allow: OPTIONS, HEAD, GET
# accept-ranges: bytes
# cache-control: public, max-age=31536000
# cache-control: max-age=31536000
# date: Thu, 10 Mar 2022 21:26:01 GMT
```
@@ -39,6 +39,6 @@ curl http://localhost:8787/assets/main.js \
# accept-ranges: bytes
# access-control-allow-headers: content-type, origin
# access-control-allow-methods: GET, OPTIONS, HEAD
# cache-control: public, max-age=31536000
# cache-control: max-age=31536000
# date: Thu, 10 Mar 2022 21:45:55 GMT
```