Dangerous Cache-Control headers

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
nginx

Research direction

Locate the nginx reverse-proxy configuration containing the shown Cache-Control directive and inspect how it applies to non-crawler responses. Confirm the intended caching behavior, then verify that ordinary browser responses no longer receive a one-year cache policy.

Written by the indexing model from the issue text.

Description

The nginx reverse proxy configuration sets a dangerous Cache-Control header that likely isn't intended for most users.

add_header Cache-Control "public,max-age=31536000";

For non-crawler users, this directs their browser to cache the response for a year.

In my case, the webpages in my app are now refusing to update in client browsers because of this long cache policy. I'm trying to alleviate the issue by modifying the response etag, but in the end, it's up to the browser to decide to revalidate the cache even though the cache expiration is a year.

Dominant language
No language data
Stars
28
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.