Try to fix cloudflare caches
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# Use the lightweight Nginx image
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy everything from your repository into the Nginx serving directory
|
||||
COPY ./ /usr/share/nginx/html
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
COPY js /usr/share/nginx/html/js
|
||||
COPY css /usr/share/nginx/html/css
|
||||
|
||||
# Tell Docker this container listens on port 80
|
||||
EXPOSE 80
|
||||
14
stacks/recipe/nginx/default.conf
Normal file
14
stacks/recipe/nginx/default.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Do not store responses in browser or shared caches (Cloudflare, etc. respect unless overridden)
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
|
||||
add_header Pragma "no-cache" always;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user