Add the client script while index.html is served

Writing the tag into index.html on disk fails on most fresh installs
(linuxserver image, distro packages, Docker as a normal user) because
the web files belong to root. A middleware now adds the tag to the
response instead, so the ShareLink action and the guest lockdown work
right after install. The on-disk edit stays as a best-effort extra, and
the tag uses a relative src so it also works under a base URL.

Bump to 1.0.8.0.
Cette révision appartient à :
Francois CB
2026-09-18 16:31:45 +02:00
Parent 21ca14b780
révision 1c7acfe185
6 fichiers modifiés avec 155 ajouts et 10 suppressions
+2
Voir le fichier
@@ -6,6 +6,7 @@ using Jellyfin.Plugin.ShareLinks.Web;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Plugins;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
@@ -29,6 +30,7 @@ public class PluginServiceRegistrator : IPluginServiceRegistrator
serviceCollection.Configure<MvcOptions>(options => options.Filters.AddService<GuestPluginApiGuard>());
serviceCollection.AddHostedService<WebInjectionHostedService>();
serviceCollection.AddTransient<IStartupFilter, IndexHtmlScriptStartupFilter>();
serviceCollection.AddSingleton<ShareLinkStore>();
serviceCollection.AddSingleton<ShareTokenService>();
serviceCollection.AddSingleton<ItemTagService>();