nginx - map directive in supplementary conf file along with invocation

This commit is contained in:
Mike Holloway committed 2025-12-07 18:38:38 -05:00
1 parent 4217f56c49
commit 911a6b5105
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
FROM nginx:latest
RUN sed -i 's/\#gzip.*on;/server_tokens\toff;\n # Set the `immutable` cache control options only for assets with a cache busting `v` argument\n map $arg_v $asset_immutable {\n "" "";\n default ", immutable";\n\n }\n #gzip\ton;/' /etc/nginx/nginx.conf
RUN sed -i 's/\#gzip.*on;/server_tokens\toff;\n #gzip\ton;/' /etc/nginx/nginx.conf
+5
View File
@@ -3,6 +3,11 @@
server 127.0.0.1:9000;
}
map $arg_v $asset_immutable {
"" "";
default ", immutable";
}
server {
listen 8080;