Skip to content

feat(signalr): opt-in SignalR/WebSocket passthrough for proxied arrs (#91) - #111

Open
bakerboy448 wants to merge 1 commit into
Notifiarr:developfrom
bakerboy448:claude/signalr-passthrough
Open

feat(signalr): opt-in SignalR/WebSocket passthrough for proxied arrs (#91)#111
bakerboy448 wants to merge 1 commit into
Notifiarr:developfrom
bakerboy448:claude/signalr-passthrough

Conversation

@bakerboy448

Copy link
Copy Markdown
Contributor

Implements #91: pass /<base>/signalr/* through to the backend arr so consumers that use the arr SignalR real-time channel (Bazarr first) keep working when repointed at starrproxy with a scoped key.

How it works

  • New nginx location ~ ^(.*)/signalr/(.*)$ WebSocket-proxies to the backend, using an internal auth_request to a small new signalr/auth.php.
  • auth.php resolves the scoped key with the existing getAppFromProxiedKey(), then returns the backend URL + the backend's real key + rewritten query args (scoped access_token swapped for the real key) via response headers for nginx to proxy_pass with.
  • Opt-in, least-privilege: a new per-app signalr flag (migration 009, default 0) gates it - auth.php returns 403 unless the app enabled it. Admin UI adds the toggle; the Bazarr templates opt in.
  • WebSocket upgrade is handled at nginx (PHP cURL can't proxy WebSockets, per the issue). Existing /api, /feed, /backup, /health, PHP, and static routes are unchanged.

Testing note: authored without a live build - PHP not linted locally and the WebSocket path needs testing against a live Sonarr/Radarr + Bazarr (including the disabled-flag 403 case). Happy to iterate.

Closes #91

…otifiarr#91)

Adds an nginx /signalr location that WebSocket-proxies /<base>/signalr/* to the
backend arr, using an internal auth_request to signalr/auth.php which resolves
the scoped key via getAppFromProxiedKey, gates on a new per-app 'signalr' opt-in
flag (migration 009), validates the backend URL, and swaps the scoped
access_token for the backend's real key. PHP cURL cannot proxy WebSockets, so
this stays at the nginx layer. Bazarr templates opt in; admin UI adds the toggle.

Closes Notifiarr#91
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.

Feature request: SignalR / websocket passthrough for proxied /signalr (arr live-push via scoped keys)

1 participant