From 38c121588997971a3d841e644b604da1b3e145d8 Mon Sep 17 00:00:00 2001 From: Mikolaj Widla Date: Wed, 19 Apr 2023 10:28:04 +0200 Subject: [PATCH] Disabled caching for frontend (#146) Disable caching for frontend Co-authored-by: widlam Reviewed-on: https://gitea.release11.com/R11/release11-tools/pulls/146 Reviewed-by: Adam Bem Co-authored-by: Mikolaj Widla Co-committed-by: Mikolaj Widla --- Frontend/Dockerfile | 1 + Frontend/nginx.conf | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 Frontend/nginx.conf diff --git a/Frontend/Dockerfile b/Frontend/Dockerfile index c776286..58fdcd5 100644 --- a/Frontend/Dockerfile +++ b/Frontend/Dockerfile @@ -4,6 +4,7 @@ COPY ./tools/ /usr/share/nginx/html/tools/ COPY ./lawful/ /usr/share/nginx/html/lawful/ COPY ./assets/ /usr/share/nginx/html/assets/ COPY ./index.html /usr/share/nginx/html +COPY ./nginx.conf /etc/nginx/conf.d/default.conf RUN mkdir -p /scripts COPY insert_version.sh /scripts/ diff --git a/Frontend/nginx.conf b/Frontend/nginx.conf new file mode 100644 index 0000000..e52fbb2 --- /dev/null +++ b/Frontend/nginx.conf @@ -0,0 +1,24 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + expires -1; + add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + +} \ No newline at end of file