-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnginx.conf
115 lines (87 loc) · 2.27 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
server {
listen 443;
listen [::]:443;
server_name hitcon.opass.app;
ssl on;
ssl_certificate /etc/letsencrypt/live/host_name/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/host_name/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header X-Content-Type-Options nosniff;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST' always;
add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,ccip';
ssl_stapling on; # Requires nginx >= 1.3.7
ssl_stapling_verify on; # Requires nginx => 1.3.7
location / {
index index.html;
root /usr/share/nginx/html/OPass-Landing/public;
}
location /puzzle {
index index.html;
alias /usr/share/nginx/html/CCIP-Puzzle-Bueno;
}
location /admin {
auth_basic "Enter your password";
auth_basic_user_file /etc/nginx/.htpasswd;
index index.html;
alias /usr/share/nginx/html/CCIP-Admin-Bueno/dist;
}
location /announcement {
if ($request_method = GET) {
set $test A;
}
if ($request_method = OPTIONS) {
set $test A;
}
if ($http_ccip = 'password') {
set $test A;
}
if ($test != A) {
return 403;
}
proxy_pass http://localhost:5000;
}
location /roles {
proxy_pass http://localhost:5000;
}
location /scenarios {
proxy_pass http://localhost:5000;
}
location /landing {
proxy_pass http://localhost:5000;
}
location /status {
# Whitelist IPs, for check user in the venue
# allow 127.0.0.1/8;
# deny all;
expires 0;
proxy_pass http://localhost:5000;
}
location /use {
# Whitelist IPs, for check user in the venue
# allow 127.0.0.1/8;
# deny all;
expires 0;
proxy_pass http://localhost:5000;
}
location /event {
expires 0;
proxy_pass http://localhost:5000;
}
location /webhook {
expires 0;
proxy_pass http://localhost:8080;
}
location /dashboard {
if ($request_method = 'OPTIONS') { return 200; }
if ($http_ccip != 'password') {
return 403;
}
expires 0;
proxy_pass http://localhost:5000;
}
}