mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Added cache headers to static resources.
This commit is contained in:
@@ -5,6 +5,7 @@ using NLog;
|
||||
using Nancy;
|
||||
using Nancy.Responses;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Api.Extensions;
|
||||
|
||||
namespace NzbDrone.Api.Frontend
|
||||
{
|
||||
@@ -43,7 +44,10 @@ namespace NzbDrone.Api.Frontend
|
||||
|
||||
if (_diskProvider.FileExists(filePath))
|
||||
{
|
||||
return new StreamResponse(() => File.OpenRead(filePath), MimeTypes.GetMimeType(filePath));
|
||||
var response = new StreamResponse(() => File.OpenRead(filePath), MimeTypes.GetMimeType(filePath));
|
||||
response.Headers.EnableCache();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
_logger.Warn("File {0} not found", filePath);
|
||||
|
Reference in New Issue
Block a user