forked from s3gw-tech/s3gw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
32 lines (26 loc) · 800 Bytes
/
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
server {
listen 80;
server_name s3gw-ui-proxy;
location / {
proxy_pass http://s3gw-ui:8080/;
}
}
server {
listen 3080;
server_name s3gw-proxy;
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Methods' 'DELETE,GET,HEAD,POST,PUT';
add_header 'Content-Type' 'application/json';
add_header 'Content-Length' 0;
return 204;
}
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Headers' '*' always;
add_header 'Access-Control-Allow-Methods' 'DELETE,GET,HEAD,POST,PUT' always;
proxy_pass http://s3gw:7480/;
}
}