-
Notifications
You must be signed in to change notification settings - Fork 57
/
nginx.conf
84 lines (65 loc) · 2.56 KB
/
nginx.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 8096;
multi_accept on;
use epoll;
}
http {
default_type application/octet-stream;
include /etc/nginx/mime.types;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
keepalive_timeout 5;
keepalive_requests 200;
reset_timedout_connection on;
server_tokens off;
map $host $kymadomain {
~^[^\.]+\.(.*)$ $1;
default 'kyma.local';
}
server {
server_name localhost;
listen 8888 http2;
root /var/public;
port_in_redirect off;
location / {
try_files $uri$args $uri$args/ $uri $uri/ /;
add_header 'Cache-Control' 'public, max-age=300';
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options 'nosniff';
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';
add_header X-XSS-Protection '1; mode=block';
add_header X-Frame-Options 'SAMEORIGIN';
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' data:; style-src 'self' 'unsafe-inline'; connect-src 'self' * https://*.$kymadomain wss://*.$kymadomain; font-src 'self' data:; frame-ancestors https://*.$kymadomain; object-src 'none'; media-src 'self'; form-action 'self'; img-src * data:; child-src * blob:; worker-src 'self' blob:;";
}
}
server {
server_name localhost3;
listen 6082;
port_in_redirect off;
location /healthz {
access_log off;
stub_status;
}
}
server {
server_name localhost2;
listen 81 http2;
root /var/public-luigi;
port_in_redirect off;
location / {
try_files $uri$args $uri$args/ $uri $uri/ /;
add_header 'Cache-Control' 'public, max-age=300';
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options 'nosniff';
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';
add_header X-XSS-Protection '1; mode=block';
add_header X-Frame-Options 'SAMEORIGIN';
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' https://*.$kymadomain wss://*.$kymadomain; font-src 'self' data:; frame-ancestors https://*.$kymadomain; object-src 'none'; media-src 'self'; form-action 'self'; img-src * data:; child-src * blob:; worker-src 'self' blob:;";
}
}
}