Disable swagger by default #6900

Closed
opened 2026-02-07 04:15:50 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @goremykin on GitHub (Apr 9, 2025).

Description of the bug

I was very surprised to find Swagger on my public Jellyfin instance (docker container). And I don't see any option how to disable it on Jellyfin side, so had to close it on reverse proxy level.

If this is expected behavior, just close the issue. I guess this is not the expected behavior considering that 99% of users are unlikely to use it and it makes life easier for attackers.
If we talk about resources, then turning off Swagger will not reduce many resources, but on weak devices every resource matters.

Reproduction steps

  1. Run Jellyfin in a docker container
  2. Go to /api-docs/swagger/index.html

What is the current bug behavior?

Swagger UI is opened

What is the expected correct behavior?

404 error

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.7

Environment

- OS:Linux
- Linux Kernel: 6.11
- Virtualization: Docker

Jellyfin logs

Not relevant

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @goremykin on GitHub (Apr 9, 2025). ### Description of the bug I was very surprised to find Swagger on my public Jellyfin instance (docker container). And I don't see any option how to disable it on Jellyfin side, so had to close it on reverse proxy level. If this is expected behavior, just close the issue. I guess this is not the expected behavior considering that 99% of users are unlikely to use it and it makes life easier for attackers. If we talk about resources, then turning off Swagger will not reduce many resources, but on weak devices every resource matters. ### Reproduction steps 1. Run Jellyfin in a docker container 2. Go to /api-docs/swagger/index.html ### What is the current _bug_ behavior? Swagger UI is opened ### What is the expected _correct_ behavior? 404 error ### Jellyfin Server version 10.10.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version 10.10.7 ### Environment ```markdown - OS:Linux - Linux Kernel: 6.11 - Virtualization: Docker ``` ### Jellyfin logs ```shell Not relevant ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 04:15:50 +03:00
Author
Owner

@nielsvanvelzen commented on GitHub (Apr 9, 2025):

This is intended behavior, the API of Jellyfin is public. In normal situations you wouldn't open this document by yourself so it won't consume any resources.

@nielsvanvelzen commented on GitHub (Apr 9, 2025): This is intended behavior, the API of Jellyfin is public. In normal situations you wouldn't open this document by yourself so it won't consume any resources.
Author
Owner

@goremykin commented on GitHub (Apr 9, 2025):

@nielsvanvelzen, Thanks for your answer. Let's close the issue then.
In terms of resources it of course uses some to create and store the schema, but it is too minimal to be an argument.

@goremykin commented on GitHub (Apr 9, 2025): @nielsvanvelzen, Thanks for your answer. Let's close the issue then. In terms of resources it of course uses some to create and store the schema, but it is too minimal to be an argument.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6900