2023-12-30, 12:56 AM
(This post was last modified: 2023-12-30, 03:38 AM by sleepparalysisdemon. Edited 1 time in total.)
Wanted to give an update. Here is a solution for Caddy. It will reverse proxy any user-agents with the string JellyfinMediaPlayer, but redirect all others to an HTML page. This works with both the Windows and Linux Flatpak media players, but not the iOS app as the User-agent for that client is Mozilla (see below for Swiftfin)
Use this for your Caddyfile:
EDIT: You can support other native clients like Swiftfin, just change the header_regexp line:
Use this for your Caddyfile:
Code:
yourdomain.xyz {
# reverse proxy jellyfin if user-agent contains string JellyfinMediaPlayer
@notbot header_regexp User-Agent (?i)(JellyfinMediaPlayer)
handle @notbot {
reverse_proxy 127.0.0.1:8096
}
# if not, load other page instead
handle {
root * /path/to/your/html/page
file_server
encode gzip
}
}
EDIT: You can support other native clients like Swiftfin, just change the header_regexp line:
Code:
@notbot header_regexp User-Agent (?i)(JellyfinMediaPlayer|Swiftfin)