From 3d2b9c3608126fe71600d46664e86bdfb89dbac7 Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 1 Mar 2026 10:27:12 -0500 Subject: [PATCH] Client/Server changes --- Client/origin-client/Dockerfile.web | 1 + Client/origin-client/nginx.default.conf | 33 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Client/origin-client/nginx.default.conf diff --git a/Client/origin-client/Dockerfile.web b/Client/origin-client/Dockerfile.web index befe964..e828337 100644 --- a/Client/origin-client/Dockerfile.web +++ b/Client/origin-client/Dockerfile.web @@ -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 diff --git a/Client/origin-client/nginx.default.conf b/Client/origin-client/nginx.default.conf new file mode 100644 index 0000000..0ce9e37 --- /dev/null +++ b/Client/origin-client/nginx.default.conf @@ -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; + } +}