forked from pinry/pinry
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
39 lines (36 loc) · 1.29 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
server {
listen 80;
server_name www.vanavil.net;
access_log /var/log/nginx/pinry_access.log;
error_log /var/log/nginx/pinry_error.log;
add_header 'Access-Control-Allow-Credentials: true' always;
location /api/v2 {
proxy_pass http://127.0.0.1:8000/api/v2;
add_header 'Access-Control-Allow-Credentials: true' always;
}
location /media {
proxy_pass http://127.0.0.1:8000/media;
add_header 'Access-Control-Allow-Credentials: true' always;
}
location /static/js {
proxy_pass http://127.0.0.1:8000/static/js;
add_header 'Access-Control-Allow-Credentials: true' always;
}
location / {
root /var/www/pinry/dist/;
index index.html;
}
}
#Configuration for backend
server {
listen 443;
server_name backend.vanavil.net;
access_log /var/log/nginx/pinry_access.log;
error_log /var/log/nginx/pinry_error.log;
add_header 'Access-Control-Allow-Credentials: true' always;
#Access-Control-Allow-Credentials needs to be enabled for CORS(Typesense)
location / {
proxy_pass http://127.0.0.1:8000/;
add_header 'Access-Control-Allow-Credentials: true' always;
}
}