Disabled caching for frontend (#146)

Disable caching for frontend

Co-authored-by: widlam <mikolaj.widla@gmail.com>
Reviewed-on: #146
Reviewed-by: Adam Bem <bema@noreply.example.com>
Co-authored-by: Mikolaj Widla <widlam@noreply.example.com>
Co-committed-by: Mikolaj Widla <widlam@noreply.example.com>
This commit is contained in:
2023-04-19 10:28:04 +02:00
committed by Adam Bem
parent 1fc1ab76ec
commit 38c1215889
2 changed files with 25 additions and 0 deletions

View File

@@ -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/

24
Frontend/nginx.conf Normal file
View File

@@ -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;
}
}