[PR #3218] [MERGED] Enable CORS and Authentation #9378

Closed
opened 2026-02-07 06:01:08 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/3218
Author: @crobibero
Created: 6/1/2020
Status: Merged
Merged: 6/9/2020
Merged by: @dkanada

Base: api-migrationHead: api-cors


📝 Commits (4)

  • b944b8f Enable CORS and Authentication.
  • e30a850 Remove log spam when using legacy api
  • 2476848 Fix tests
  • 6be8625 Merge remote-tracking branch 'upstream/api-migration' into api-cors

📊 Changes

7 files changed (+62 additions, -5 deletions)

View changed files

📝 Emby.Server.Implementations/HttpServer/Security/AuthService.cs (+6 -0)
📝 Jellyfin.Api/Auth/CustomAuthenticationHandler.cs (+9 -2)
📝 Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs (+7 -1)
Jellyfin.Server/Models/ServerCorsPolicy.cs (+30 -0)
📝 Jellyfin.Server/Startup.cs (+3 -1)
📝 MediaBrowser.Controller/Net/AuthenticatedAttribute.cs (+4 -0)
📝 tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs (+3 -1)

📄 Description

Currently the logfile spams this: Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Access token is required.
but authentication doesn't work without the call to app.UseAuthentication();

CORS is currently set to allow any Origin, Method, and Header.

Fixes #3161


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/3218 **Author:** [@crobibero](https://github.com/crobibero) **Created:** 6/1/2020 **Status:** ✅ Merged **Merged:** 6/9/2020 **Merged by:** [@dkanada](https://github.com/dkanada) **Base:** `api-migration` ← **Head:** `api-cors` --- ### 📝 Commits (4) - [`b944b8f`](https://github.com/jellyfin/jellyfin/commit/b944b8f8c54963f61eee5eeb97cd1745ae42ac50) Enable CORS and Authentication. - [`e30a850`](https://github.com/jellyfin/jellyfin/commit/e30a85025f3d0f8b936827613239da7c2c2387c2) Remove log spam when using legacy api - [`2476848`](https://github.com/jellyfin/jellyfin/commit/2476848dd3d69252c5bc8b45a4eddf545354a0c0) Fix tests - [`6be8625`](https://github.com/jellyfin/jellyfin/commit/6be862545ae76eb454b91601f08745e7b46dcd28) Merge remote-tracking branch 'upstream/api-migration' into api-cors ### 📊 Changes **7 files changed** (+62 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/HttpServer/Security/AuthService.cs` (+6 -0) 📝 `Jellyfin.Api/Auth/CustomAuthenticationHandler.cs` (+9 -2) 📝 `Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs` (+7 -1) ➕ `Jellyfin.Server/Models/ServerCorsPolicy.cs` (+30 -0) 📝 `Jellyfin.Server/Startup.cs` (+3 -1) 📝 `MediaBrowser.Controller/Net/AuthenticatedAttribute.cs` (+4 -0) 📝 `tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs` (+3 -1) </details> ### 📄 Description ~~Currently the logfile spams this: `Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Access token is required.` but authentication doesn't work without the call to `app.UseAuthentication();`~~ CORS is currently set to allow any Origin, Method, and Header. Fixes #3161 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:01:08 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#9378