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

Adding cache control headers #8622

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
server {
listen 80;
root /usr/share/nginx/html;

include mime.types;
types {
text/javascript js mjs;
}

listen 80;
location = /index.html {
expires 6h;
}

location / {
root /usr/share/nginx/html;
index index.html index.htm;
expires 7d;
try_files $uri $uri/ /index.html;
}

error_page 500 502 503 504 /50x.html;

location = /50x.html {
root /usr/share/nginx/html;
}
}
Loading