mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
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:
@@ -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}]⏎
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user