-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsecrets-nginx.conf
More file actions
39 lines (31 loc) · 1.54 KB
/
secrets-nginx.conf
File metadata and controls
39 lines (31 loc) · 1.54 KB
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
server {
listen 443 ssl;
server_name _;
ssl_certificate SSL_CERT;
ssl_certificate_key SSL_KEY;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
limit_conn perip 10;
access_log off;
location / {
add_header Application-Name secrets;
#CORS
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS' always;
add_header Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With" always;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS' always;
add_header 'Access-Control-Max-Age' 86400 always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;
add_header 'Content-Length' 0 always;
add_header 'Content-Type' 'text/plain charset=UTF-8' always;
return 204;
}
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://secrets:8080/;
}
}