github therobbiedavis/Listenarr 0.1.23
Canary 0.1.23

latest releases: 0.2.40, 0.2.39, 0.2.38...
pre-releaseone month ago

This pull request introduces enhancements to how API keys are handled and transmitted between the frontend and backend services, particularly for image URLs and WebSocket connections. The main goal is to ensure that API keys are consistently and securely included in requests, allowing the backend to authenticate browser-driven requests via query parameters. The changes span both frontend TypeScript code and backend C# middleware.

Frontend: API key propagation and cache access

  • Added a synchronous getCachedStartupConfig function to startupConfigCache.ts for instant access to the cached startup config, enabling API key retrieval without awaiting asynchronous calls.
  • Updated image URL handling in ApiService (api.ts) to append the API key as an access_token query parameter when present, ensuring authenticated access for image requests.
  • Modified SignalR connection logic in SignalRService (signalr.ts) to append the API key as an access_token to the WebSocket handshake URL, supporting server-side authentication for websocket connections.
  • Imported getCachedStartupConfig in api.ts for use in synchronous API key retrieval.

Backend: Middleware authentication improvements

  • Enhanced ApiKeyMiddleware.cs to accept API keys supplied via access_token or apikey query parameters, in addition to headers, allowing authentication for requests initiated by the browser (such as SignalR and image URLs).

Automated canary build

  • Version: 0.1.23
  • Commit: 751c5c6
  • Original PR: #56

Don't miss a new Listenarr release

NewReleases is sending notifications on new releases.