Skip to content

Commit 4067ad5

Browse files
committed
added proxy pass to bypass cors
1 parent 2e86831 commit 4067ad5

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

web/nginx.conf

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
server {
2-
listen 3000;
3-
server_name localhost;
4-
root /usr/share/nginx/html;
5-
index index.html index.htm;
6-
location / {
7-
try_files $uri $uri/ /index.html;
8-
}
2+
listen 3000;
3+
server_name localhost;
4+
root /usr/share/nginx/html;
5+
index index.html index.htm;
6+
7+
location / {
8+
try_files $uri $uri/ /index.html;
9+
}
10+
11+
# Proxy API requests to the Go API
12+
location /api/ {
13+
proxy_pass http://api-http-sms.zorvia.dev; # Use Docker service name and port
14+
proxy_http_version 1.1;
15+
proxy_set_header Host $host;
16+
proxy_set_header X-Real-IP $remote_addr;
17+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
18+
}
919
}

0 commit comments

Comments
 (0)