File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ COPY cfg/purge.php /usr/share/nginx/html/
25
25
# access environment variables without significant workarounds. Furthermore, the variables are
26
26
# required because nginx does not currently support nested if statements.
27
27
RUN if [ -n "$CDN_ACCESS_KEY" ]; then \
28
- sed -i s/##PLACEHOLDER-cdn_header_detection-DO_NOT_CHANGE##/ "map \$ http_x_cdn_access \$ reroute_to_cdn { default '1'; $ CDN_ACCESS_KEY '0'; }" /g /etc/nginx/conf.d/default.conf && \
29
- sed -i s/##PLACEHOLDER-cdn_reroute-DO_NOT_CHANGE ##/"if ( \$ reroute_to_cdn) { return 301 \$ scheme: \/\/ code.jquery.com \$ uri; }" /g /etc/nginx/conf.d/default.conf; \
28
+ sed -i s/CDN_ACCESS_KEY_PLACEHOLDER/$ CDN_ACCESS_KEY/g /etc/nginx/conf.d/default.conf && \
29
+ sed -i s/##ACTIVATE-XCDNACCESS ##//g /etc/nginx/conf.d/default.conf; \
30
30
fi
31
31
32
32
# Load the releases into the container
Original file line number Diff line number Diff line change 15
15
# Increase map_hash_bucket_size to accommodate longer CDN tokens
16
16
map_hash_bucket_size 128;
17
17
18
- # Do not change the following line. The Dockerfile will add CDN header detection at build time if
19
- # the correct environment variable is set.
20
-
21
- ##PLACEHOLDER-cdn_header_detection-DO_NOT_CHANGE##
18
+ # Do not change the following lines. The Dockerfile will set the access key and remove the comment
19
+ # at build time if the correct environment variable is set.
20
+ ##ACTIVATE-XCDNACCESS##map $http_x_cdn_access $reroute_to_cdn { default '1'; CDN_ACCESS_KEY_PLACEHOLDER '0'; }
22
21
23
22
server {
24
23
listen 80;
@@ -31,9 +30,9 @@ server {
31
30
root /usr/share/nginx/html;
32
31
index index.html index.htm;
33
32
34
- # Do not change the following line. The Dockerfile will add the reroute logic at build time if
35
- # the correct environment variable is set.
36
- ##PLACEHOLDER-cdn_reroute-DO_NOT_CHANGE##
33
+ # Do not change the following line. The Dockerfile will set the access key and remove the
34
+ # comment at build time if the correct environment variable is set.
35
+ ##ACTIVATE-XCDNACCESS##if ($reroute_to_cdn) { return 301 \$scheme:\/\/code.jquery.com\$uri; }
37
36
38
37
}
39
38
You can’t perform that action at this time.
0 commit comments