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 à :
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace Jellyfin.Plugin.ShareLinks.Web;
|
||||
|
||||
/// <summary>
|
||||
/// Puts <see cref="IndexHtmlScriptMiddleware"/> in front of Jellyfin's own pipeline.
|
||||
/// </summary>
|
||||
public sealed class IndexHtmlScriptStartupFilter : IStartupFilter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next)
|
||||
{
|
||||
return app =>
|
||||
{
|
||||
app.UseMiddleware<IndexHtmlScriptMiddleware>();
|
||||
next(app);
|
||||
};
|
||||
}
|
||||
}
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur