fix: use base URL for Supabase client, nginx proxies /rest/v1/ and /auth/v1/

The Supabase JS client auto-derives API paths from the base URL:
- REST: ${url}/rest/v1/
- Auth: ${url}/auth/v1/

Nginx now proxies these standard paths to the correct backend services.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 16:45:36 -04:00
parent a1a10abb8e
commit 1e640aa0c8
4 changed files with 9 additions and 10 deletions

View File

@@ -10,8 +10,8 @@ server {
try_files $uri $uri/ /index.html;
}
# Reverse proxy: PostgREST (database REST API)
location /rest/ {
# Reverse proxy: PostgREST (Supabase client hits /rest/v1/*)
location /rest/v1/ {
proxy_pass http://rest:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -19,8 +19,8 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}
# Reverse proxy: GoTrue (auth)
location /auth/ {
# Reverse proxy: GoTrue auth (Supabase client hits /auth/v1/*)
location /auth/v1/ {
proxy_pass http://auth:9999/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;