forked from Open-Coding-Society/spring
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnginx_file
More file actions
20 lines (18 loc) · 799 Bytes
/
nginx_file
File metadata and controls
20 lines (18 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
server {
server_name spring.opencodingsociety.com;
# General API Proxy
location / {
proxy_pass http://localhost:8587;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# CORS Headers
if ($request_method = OPTIONS) {
add_header "Access-Control-Allow-Credentials" "true" always;
add_header "Access-Control-Allow-Origin" "https://pages.opencodingsociety.com" always;
add_header "Access-Control-Allow-Methods" "GET, POST, PUT, OPTIONS, HEAD" always;
add_header "Access-Control-Allow-Max-Age" 600 always;
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Origin, X-Requested-With, Content-Type, Accept" always;
return 204;
}
}
}