Closed SukkaW closed 4 years ago
https://github.com/cloudflare/template-registry/blob/master/templates/javascript/redirect.js
I have noticed that Response#redirect could be used to set up a 301/302 redirect easily. But is it possible to add Cache-Control header to 301 redirect? (Just like Cloudflare's Always Use HTTPS which adds cache-control: public, max-age=3600)
Response#redirect
Cache-Control
Always Use HTTPS
cache-control: public, max-age=3600
Achieved by manually build up a Response Object. Closed.
Response
https://github.com/cloudflare/template-registry/blob/master/templates/javascript/redirect.js
I have noticed that
Response#redirect
could be used to set up a 301/302 redirect easily. But is it possible to addCache-Control
header to 301 redirect? (Just like Cloudflare'sAlways Use HTTPS
which addscache-control: public, max-age=3600
)