Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds and removes headers for index.html to prevent it from being hashed #3392

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

thoniTUB
Copy link
Collaborator

@thoniTUB thoniTUB commented Apr 12, 2024

* Rebuilt URL to: localhost:7777/
* Uses proxy env variable no_proxy == 'localhost,
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 7777 (#0)
> GET / HTTP/1.1
> Host: localhost:7777
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.24.0
< Date: Fri, 12 Apr 2024 06:37:55 GMT
< Content-Type: text/html
< Content-Length: 992
< Last-Modified: Fri, 12 Apr 2024 06:37:29 GMT
< Connection: keep-alive
< Vary: Accept-Encoding
< Cache-Control: no-store
< Accept-Ranges: bytes
<
<!DOCTYPE html>
<html lang="en">

ETag removed and Cache-Control: no-store.

Other assets remain cachable, such as js and css

@thoniTUB thoniTUB requested review from awildturtok and Kadrian April 12, 2024 06:39

gzip on;
gzip_vary on;
gzip_types application/javascript text/css;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to restrict this to those types?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, should be fine to zip every thing if it is performant using the wildcard. text/html seems to be always compressed.


location / {
root /usr/share/nginx/html;
index index.html index.htm;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no index.htm

@thoniTUB thoniTUB force-pushed the fix/dont-cache-index-html branch from eb0b634 to 1e945a5 Compare April 23, 2024 11:15
@thoniTUB thoniTUB changed the base branch from release to develop April 29, 2024 09:07
@thoniTUB thoniTUB enabled auto-merge April 29, 2024 09:08
@thoniTUB thoniTUB merged commit 1784b10 into develop Apr 29, 2024
5 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/dont-cache-index-html branch April 29, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants