Skip silent auth check for /internal/ and /oembed paths
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m32s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m32s
Fragment and oEmbed endpoints must be accessible without authentication. The silent auth middleware was returning 302 redirects, causing fragment fetches from coop apps to silently fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ from artdag_common.middleware.auth import get_user_from_cookie
|
|||||||
from .config import settings
|
from .config import settings
|
||||||
|
|
||||||
# Paths that should never trigger a silent auth check
|
# Paths that should never trigger a silent auth check
|
||||||
_SKIP_PREFIXES = ("/auth/", "/static/", "/api/", "/ipfs/", "/download/", "/inbox", "/health")
|
_SKIP_PREFIXES = ("/auth/", "/static/", "/api/", "/ipfs/", "/download/", "/inbox", "/health", "/internal/", "/oembed")
|
||||||
_SILENT_CHECK_COOLDOWN = 300 # 5 minutes
|
_SILENT_CHECK_COOLDOWN = 300 # 5 minutes
|
||||||
_DEVICE_COOKIE = "artdag_did"
|
_DEVICE_COOKIE = "artdag_did"
|
||||||
_DEVICE_COOKIE_MAX_AGE = 30 * 24 * 3600 # 30 days
|
_DEVICE_COOKIE_MAX_AGE = 30 * 24 * 3600 # 30 days
|
||||||
|
|||||||
Reference in New Issue
Block a user