Skip to content

fix(plex): keep Plex tokens out of the Traefik access log - #3153

Merged
MichielMak merged 1 commit into
mainfrom
fix/plex-token-in-traefik-logs
Oct 25, 2026
Merged

MichielMak merged 1 commit into
mainfrom
fix/plex-token-in-traefik-logs

Conversation

@michiel-claude

Copy link
Copy Markdown
Contributor

Why

Plex clients send their token as X-Plex-Token in the query string. Traefik's access log (--accesslog=true, all fields kept) logs the full request path, so every Plex request wrote a token to the Traefik logs.

What changed

Added traefik.http.routers.plex.observability.accesslogs=false to the plex router (Traefik v3.1+). Only Plex loses its access log lines. Other services keep theirs.

After merging

  1. Gitops redeploys plex (labels changed), so Plex restarts briefly.
  2. Check that Traefik no longer logs plex requests.
  3. Recreate the Traefik container so its old logs, which contain the current Plex token, are dropped.
  4. Rotate the Plex token: Plex → Settings → Devices → "Sign out of all devices".
  5. Update PLEX_TOKEN in the SOPS files that use it (plex, kometa, plex-auto-languages) and deploy those stacks by hand.

Remaining risk

cloudflared still logs the full URL of failed requests (ERR Request failed), so a Plex token can still end up there when a request through the tunnel fails. cloudflared can't filter that.

🤖 Generated with Claude Code

Plex clients send X-Plex-Token in the query string, and the Traefik
access log keeps the full request path. Turn off access logging for the
plex router only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🛡️ Trivy image scan — fixable HIGH/CRITICAL vulnerabilities found

The images below have known vulnerabilities with fixes available. Update to a patched image (digest) before merging.

linuxserver/plex:1.43.5@sha256:8f655bad7dcbc5398a78f70a5af12600b4ed3424f901566ed1eaa6710e9e2334

0 CRITICAL, 6 HIGH fixable vulnerabilities

CVE Package Installed Fixed Severity
CVE-2026-111943 stdlib v1.27.1 1.26.10, 1.27.3 HIGH
CVE-2026-78667 stdlib v1.27.1 1.26.9, 1.27.2 HIGH
CVE-2026-78669 stdlib v1.27.1 1.26.9, 1.27.2 HIGH
CVE-2026-92392 curl 8.18.0-1ubuntu2.7 8.18.0-1ubuntu2.8 HIGH
CVE-2026-92392 libcurl4t64 8.18.0-1ubuntu2.7 8.18.0-1ubuntu2.8 HIGH
CVE-2026-97031 stdlib v1.27.1 1.26.9, 1.27.2 HIGH

@MichielMak
MichielMak enabled auto-merge (squash) October 25, 2026 22:48
@MichielMak
MichielMak merged commit 2585cc0 into main Oct 25, 2026
2 of 3 checks passed
@MichielMak
MichielMak deleted the fix/plex-token-in-traefik-logs branch October 25, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant