From 16907c39ca8de6b34a8992c3671f2d132160c1ae Mon Sep 17 00:00:00 2001 From: JakeBreath Date: Thu, 17 Sep 2026 22:50:12 -0500 Subject: [PATCH] Support cross-origin frontends alongside same-origin setups - django-cors-headers with env-driven CORS_ALLOWED_ORIGINS, CORS_ALLOW_ALL_ORIGINS, CORS_ALLOW_CREDENTIALS and CSRF_TRUSTED_ORIGINS; same-origin traffic is unaffected and a disallowed origin gets no CORS headers. Token auth needs no cookies, so credentials stay off by default. - TRUST_PROXY_HEADERS=true lets a TLS-terminating proxy supply X-Forwarded-Proto/Host for correct absolute URLs. - API media URLs (raw/thumbnail/upload/similarity/staged previews) are now absolute, built from the request host, so /