File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
* ~
2
2
* .swp
3
3
* .swo
4
+ * .pem
5
+
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ server {
31
31
resolver_timeout 5s;
32
32
33
33
add_header Strict-Transport-Security max-age=15638400;
34
- add_header X-Frame-Options DENY ;
34
+ add_header X-Frame-Options "{{XFRAME_VALUE}}" ;
35
35
add_header X-Content-Type-Options nosniff;
36
36
37
37
location / {
Original file line number Diff line number Diff line change 52
52
# Tell nginx the address and port of the service to proxy to
53
53
sed -i " s/{{TARGET_SERVICE}}/${TARGET_SERVICE} /g;" /etc/nginx/conf.d/proxy.conf
54
54
55
+ # Tell nginx if you want to block or allow iframing of pages and what domain name is allowed to iframe your content
56
+ if [ -n " ${XFRAME_OPTION+1} " ]; then
57
+ echo " Applying iframe option..."
58
+ sed -i " s/{{XFRAME_VALUE}}/${XFRAME_OPTION} /g;" /etc/nginx/conf.d/proxy.conf
59
+ else
60
+ echo " Denying iframes..."
61
+ sed -i " s/{{XFRAME_VALUE}}/DENY/g;" /etc/nginx/conf.d/proxy.conf
62
+ fi
63
+
64
+
55
65
echo " Starting nginx..."
56
66
nginx -g ' daemon off;'
You can’t perform that action at this time.
0 commit comments