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:
parent
4173656c89
commit
3fccfd75ed
2 changed files with 10 additions and 0 deletions
|
|
@ -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};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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__;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue