mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 20:11:10 +00:00
Adds artwork provider system and Calibre plugin
This commit is contained in:
1 parent
c82fadc7a2
commit
6693ff3f60
124 files changed
+9715
-74
No files matched your search
@@ -166,7 +166,13 @@ public class Program
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(mediaRootPath),
|
||||
RequestPath = "/media"
|
||||
RequestPath = "/media",
|
||||
OnPrepareResponse = staticFileContext =>
|
||||
{
|
||||
// the served media must not run as active content, so that attacker-influenced files (e.g. SVG covers) cannot execute scripts on the API origin
|
||||
staticFileContext.Context.Response.Headers["X-Content-Type-Options"] = "nosniff";
|
||||
staticFileContext.Context.Response.Headers["Content-Security-Policy"] = "default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src 'self' data:";
|
||||
}
|
||||
});
|
||||
|
||||
app.MapHub<MediaLibraryScanProgressHub>("/scanProgressHub");
|
||||
|
||||
Reference in new issue
Block a user