-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
56 lines (50 loc) · 1.89 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
48
49
50
51
52
53
54
55
56
# server {
# listen 80;
# server_name localhost;
# location / {
# root /usr/share/nginx/html;
# index index.html;
# try_files $uri /index.html;
# proxy_pass http://172.17.0.1:5173;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# }
# location /api/ {
# proxy_pass http://172.17.0.1:3000;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# add_header Access-Control-Allow-Origin http://172.17.0.1;
# add_header Access-Control-Allow-Credentials true;
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
# add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept";
# if ($request_method = OPTIONS) {
# add_header Access-Control-Allow-Origin http://172.17.0.1;
# add_header Access-Control-Allow-Credentials true;
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
# add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept";
# return 204;
# }
# }
# }
# server {
# listen 80;
# server_name frontend;
# location / {
# # This would be the directory where your React app's static files are stored at
# root /usr/share/nginx/html;
# index index.html;
# try_files $uri /index.html;
# }
# location /services/m {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-NginX-Proxy true;
# proxy_pass http://backend:3000/services/m;
# proxy_ssl_session_reuse off;
# proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_cache_bypass $http_upgrade;
# proxy_redirect off;
# }
# }