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 7aed45e98602f57c2d6d33532080bad30cf02507.

* revert py_autofix.yml

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e98602f57c2d6d33532080bad30cf02507.

* 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
commit 3fccfd75ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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__;