-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
47 lines (42 loc) · 1.92 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
# user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log notice;
pid /var/tmp/nginx/nginx.pid;
events { worker_connections 1024; }
http {
include /etc/nginx/mime.types;
proxy_pass_header Authorization;
proxy_pass_request_headers on;
client_body_temp_path "/var/tmp/nginx/client_body" 1 2;
proxy_temp_path "/var/tmp/nginx/proxy" 1 2;
fastcgi_temp_path "/var/tmp/nginx/fastcgi" 1 2;
scgi_temp_path "/var/tmp/nginx/scgi" 1 2;
uwsgi_temp_path "/var/tmp/nginx/uwsgi" 1 2;
sendfile on;
server {
listen 8080;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html?/$request_uri;
}
location /flowify-server/api {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,
X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
add_header 'Content-Type' 'application/json';
add_header 'Content-Length' 0;
return 204;
}
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,
X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
# flowify_token_auth
proxy_pass http://${FLOWIFY_SERVER_HOST}:${FLOWIFY_SERVER_PORT}/api;
}
}
}