Skip to content

Commit 533425e

Browse files
author
Kristan Kenney
committed
Remove global headers from nginx.conf
Fixes issue hestiacp#383.
1 parent 7edb507 commit 533425e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

install/deb/nginx/nginx.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ http {
116116
ssl_stapling_verify on;
117117
resolver 1.0.0.1 1.1.1.1 valid=300s ipv6=off;
118118
resolver_timeout 5s;
119-
add_header X-Frame-Options SAMEORIGIN;
120-
add_header X-Content-Type-Options nosniff;
121119

122120
# Error pages
123121
error_page 403 /error/404.html;

install/upgrade/1.00.0-190621.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@ if [ "$version" != "1.00.0-190618" ] && [ "$version" != "0.10.0" ] then
2323
source $HESTIA/install/upgrade/1.00.0-190618.sh
2424
fi
2525

26-
# Place additional commands below.
26+
# Place additional commands below.
27+
28+
# Remove global options from nginx.conf to prevent conflicts with other web packages
29+
if [ -e /etc/nginx/nginx.conf ]; then
30+
echo "(*) Updating NGINX global configuration..."
31+
sed -i 's/add_header X-Frame-Options SAMEORIGIN;/d' /etc/nginx/nginx.conf
32+
sed -i 's/add_header X-Content-Type-Options nosniff;/d' /etc/nginx/nginx.conf
33+
fi

0 commit comments

Comments
 (0)