File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,24 +109,25 @@ COPY <<EOF /etc/nginx/conf.d/default.conf
109109server {
110110 listen 80;
111111 server_name localhost;
112+ root /usr/share/nginx/html;
112113
113114 # Serve the Admin SPA under /webapp/
114115 location /webapp/ {
115116 alias /usr/share/nginx/html/webapp/;
116117 try_files \$ uri \$ uri/ /webapp/index.html;
118+
119+ # Cache static assets
120+ location ~* \. (js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
121+ expires 1y;
122+ add_header Cache-Control "public, immutable" ;
123+ }
117124 }
118125
119126 # Redirect /webapp to /webapp/
120127 location = /webapp {
121128 return 301 /webapp/;
122129 }
123130
124- # Cache static assets
125- location ~* \. (js|css|png|jpg|jpeg|gif|ico|svg)$ {
126- expires 1y;
127- add_header Cache-Control "public, immutable" ;
128- }
129-
130131 # Security headers
131132 add_header X-Frame-Options "SAMEORIGIN" always;
132133 add_header X-Content-Type-Options "nosniff" always;
You can’t perform that action at this time.
0 commit comments