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 à :
@@ -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>();
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur