Commit Graph

2 Commits

Author SHA1 Message Date
fegger b62ad15be8 fix: move CORS OPTIONS handling into nginx location block
Nginx does not allow add_header inside if blocks at the server level.
Moving the OPTIONS preflight response into the location / block fixes the
emerg directive error and allows nginx to start correctly.
2026-05-19 22:15:04 +02:00
fegger 76887ea8ca feat: add Nginx reverse proxy for robust CORS handling
Replace direct host port mapping with an Nginx reverse proxy that properly
handles CORS for any origin, including Obsidian's app://obsidian.md.

- docker-compose.yml: Add nginx service on port 8666, route to internal
  chroma:8000. Remove CORS env var from ChromaDB (handled by proxy now).

- nginx.conf (new): Minimal alpine config with permissive CORS headers,
  preflight OPTIONS handling, and streaming support (proxy_buffering off).

This fixes cross-origin access from remote Obsidian clients connecting over
Tailscale or VPN.
2026-05-19 22:08:11 +02:00