Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickjacking (X-Frame-Options Header) security patch fix on file doubtfire-web-webnginx.conf #266

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,24 +1,56 @@
worker_processes 1;

events { }
events { }

http {
include /etc/nginx/mime.types;

sendfile on;

# Server block for port 80
server {
root /usr/share/nginx/html/;
index index.html;
listen 80;

add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval' blob: data: ws:" always;
# add_header Feature-Policy "microphone=(self),speaker=(self),fullscreen=(self),payment=(none);" always;
add_header Permissions-Policy "microphone=(self),speaker=(self),fullscreen=(self),payment=(none)" always;
add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval' blob: data:" always;
add_header Feature-Policy "microphone 'self';speaker 'self';fullscreen 'self';payment none;" always;
add_header Permissions-Policy "microphone=(self), fullscreen=(self), payment=()" always;

# X-Frame-Options header for clickjacking protection
add_header X-Frame-Options "DENY" always;
}

# Server block for port 4200
server {
root /usr/share/nginx/html/;
index index.html;
listen 4200;

add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval' blob: data:" always;
add_header Feature-Policy "microphone 'self';speaker 'self';fullscreen 'self';payment none;" always;
add_header Permissions-Policy "microphone=(self), fullscreen=(self), payment=()" always;

# X-Frame-Options header for clickjacking protection
add_header X-Frame-Options "DENY" always;
}

# Server block for port 443
server {
root /usr/share/nginx/html/;
index index.html;
listen 443;

add_header Content-Security-Policy "default-src https: 'unsafe-inline' 'unsafe-eval' blob: data:" always;
add_header Feature-Policy "microphone 'self';speaker 'self';fullscreen 'self';payment none;" always;
add_header Permissions-Policy "microphone=(self), fullscreen=(self), payment=()" always;

# X-Frame-Options header for clickjacking protection
add_header X-Frame-Options "DENY" always;
}

gzip on;
gzip_types text/css application/javascript;
gzip_proxied any;
gzip_buffers 32 8k;

}