feat: frontend docker nginx configuration add brower cache accelerated pages access (#7125)

* Update py_autofix.yml

* feat: frontend docker nginx  add brower cache accelerate page access

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e986.

* revert py_autofix.yml

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e986.

* add: remove blank line

* fix: update Nginx configuration to prevent caching for index.html

---------

Co-authored-by: tianzhipeng <tzpabc@gmail.com>
Co-authored-by: caojianwei-jk <caojianwei-jk@360shuke.com>
This commit is contained in:
jeevi cao
2025-04-11 01:57:41 +08:00
committed by GitHub
parent 4173656c89
commit 3fccfd75ed
2 changed files with 10 additions and 0 deletions

View File

@ -27,7 +27,15 @@ http {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
expires 1d;
add_header Cache-Control "public";
}
location = /index.html {
root /usr/share/nginx/html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
etag on;
}
location /api {
proxy_pass ${BACKEND_URL};
}

View File

@ -13,6 +13,8 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
expires 1d;
add_header Cache-Control "public";
}
location /api {
proxy_pass __BACKEND_URL__;