feat: add CORS configuration options to enhance API security
This commit is contained in:
+15
-1
@@ -14,4 +14,18 @@ PLEXPLAYLISTSYNC_AUTH_PASSWORD=CHANGE_PASSWORD
|
||||
PLEXPLAYLISTSYNC_AUTH_TOKEN_SECRET=REPLACE_WITH_A_RANDOM_STRING
|
||||
|
||||
# Token TTL seconds (optional)
|
||||
PLEXPLAYLISTSYNC_AUTH_TOKEN_TTL_SECONDS=86400
|
||||
PLEXPLAYLISTSYNC_AUTH_TOKEN_TTL_SECONDS=86400
|
||||
|
||||
# CORS allowlist (optional)
|
||||
# Default is empty (CORS disabled; same-origin only).
|
||||
# Accepts comma-separated list or a JSON array.
|
||||
# Example:
|
||||
# PLEXPLAYLISTSYNC_CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
|
||||
# or
|
||||
# PLEXPLAYLISTSYNC_CORS_ALLOWED_ORIGINS=["https://your.domain"]
|
||||
PLEXPLAYLISTSYNC_CORS_ALLOWED_ORIGINS=
|
||||
|
||||
# Allow cookies/credentials for allowlisted origins (optional)
|
||||
# 1 = enabled, 0 = disabled
|
||||
# Note: if origins contains '*', credentials will be forced off.
|
||||
PLEXPLAYLISTSYNC_CORS_ALLOW_CREDENTIALS=0
|
||||
Reference in New Issue
Block a user