nginx how to use expires with cache-control: public
I’d like to set the following header using nginx:
Cache-Control: public, max-age=604800
My problem is that:
- If I use
expires, it adds onlymax-age - If I use
add_header Cache-Control public, then it adds onlypublic. - If I use both, then it adds two separate headers, both with the same “key”:
cache-control: max-age=604800
cache-control: public
My questions:
- Do I have to worry about anything, or it’s good like this, defined in 2 separate headers?
- If it’s not good, how can I combine them into one?
- Do I need
publicat all?
Read more here: Source link
