-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginxangular.conf
27 lines (22 loc) · 1.63 KB
/
nginxangular.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
add_header Strict-Transport-Security 'max-age=0; includeSubDomains; preload';
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options "SAMEORIGIN";
add_header Referrer-Policy "strict-origin";
add_header 'Cache-control' 'no-cache';
add_header X-Content-Type-Options nosniff;
add_header Content-Security-Policy "default-src 'self' *.crowncommercial.gov.uk *.rollbar.com https://c.contentsquare.net https://www.google-analytics.com https://ssl.google-analytics.com https://region1.google-analytics.com https://cdn2.gbqofs.com https://report.crown-comm.gbqofs.io; worker-src 'self' *.crowncommercial.gov.uk blob:; script-src 'self' 'nonce-$request_id' *.crowncommercial.gov.uk https://www.googletagmanager.com https://www.google-analytics.com https://ssl.google-analytics.com https://region1.google-analytics.com https://cdn2.gbqofs.com *.aspnetcdn.com https://report.crown-comm.gbqofs.io 'unsafe-eval'; media-src crown-commercial-service.github.io; font-src *;img-src * data:; style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com; style-src 'self' 'unsafe-inline' 'unsafe-inline' https://fonts.googleapis.com;";
# substitute as many values as are found (not just one)
sub_filter_once off;
# substitute randomNonceGoesHere in the index.html file (ngCspNonce="randomNonceGoesHere") with
# the $request_id so that it matches the nonce-$request_id in the CSP
sub_filter randomvalue $request_id;
server_name _;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /index.html;
}