Client/Server changes

This commit is contained in:
dingo
2026-03-01 10:27:12 -05:00
parent 4322732b47
commit 3d2b9c3608
2 changed files with 34 additions and 0 deletions
+1
View File
@@ -56,4 +56,5 @@ RUN godot --headless --export-release "HTML5" build/web/index.html
FROM nginx:1.27-alpine
COPY --from=build /project/build/web/ /usr/share/nginx/html/
COPY nginx.default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
+33
View File
@@ -0,0 +1,33 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
etag on;
# The Godot web export uses stable filenames (index.js, index.wasm, index.pck).
# Force the browser to revalidate on each navigation so a new deployment is
# picked up without manually clearing the cache.
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
try_files $uri =404;
}
location ~* \.(js|wasm|pck|png|jpg|jpeg|gif|svg|webp|json|txt|import)$ {
add_header Cache-Control "no-cache, max-age=0, must-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
try_files $uri =404;
}
location / {
add_header Cache-Control "no-cache, max-age=0, must-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
try_files $uri $uri/ /index.html;
}
}