Skip to content

Send and receive SMS messages using your Android phone programmatically via a simple HTTP API

added proxy pass to bypass cors

orpheusohms4067ad54548a
diff --git a/web/nginx.conf b/web/nginx.conf
index 979fe802..8074a814 100644
--- a/web/nginx.conf
+++ b/web/nginx.conf
@@ -1,9 +1,19 @@
server {
- listen 3000;
- server_name localhost;
- root /usr/share/nginx/html;
- index index.html index.htm;
-location / {
- try_files $uri $uri/ /index.html;
- }
+ listen 3000;
+ server_name localhost;
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+
+ # Proxy API requests to the Go API
+ location /api/ {
+ proxy_pass http://api-http-sms.zorvia.dev; # Use Docker service name and port
+ proxy_http_version 1.1;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
}