mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Public caching causes an issue with cache validation on browser causing images not to be cached correctly. Made private to ensure we get proper images each load.
This commit is contained in:
parent
1f24725905
commit
52b91a9b92
@ -228,11 +228,6 @@ namespace API.Controllers
|
||||
[HttpGet("search")]
|
||||
public async Task<ActionResult<IEnumerable<SearchResultDto>>> Search(string queryString)
|
||||
{
|
||||
// TODO: Add indecies to DB for the searched fields
|
||||
//NOTE: What about normalizing search query and only searching against normalizedname in Series?
|
||||
// So One Punch would match One-Punch
|
||||
// This also means less indexes we need.
|
||||
// TODO: Add indexes of what we are searching on
|
||||
queryString = queryString.Replace(@"%", "");
|
||||
|
||||
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername());
|
||||
|
@ -6,7 +6,6 @@
|
||||
public string Name { get; init; }
|
||||
public string OriginalName { get; init; }
|
||||
public string SortName { get; init; }
|
||||
//public byte[] CoverImage { get; init; } // This should be optional or a thumbImage (much smaller) // TODO: Refactor to lazy loading
|
||||
|
||||
// Grouping information
|
||||
public string LibraryName { get; set; }
|
||||
|
@ -422,7 +422,7 @@ namespace API.Parser
|
||||
|
||||
public static string Normalize(string name)
|
||||
{
|
||||
return name.ToLower().Replace("-", "").Replace(" ", "");
|
||||
return name.ToLower().Replace("-", "").Replace(" ", "").Replace(":", "");
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,11 +105,11 @@ namespace API
|
||||
context.Response.GetTypedHeaders().CacheControl =
|
||||
new Microsoft.Net.Http.Headers.CacheControlHeaderValue()
|
||||
{
|
||||
Public = true,
|
||||
Public = false,
|
||||
MaxAge = TimeSpan.FromSeconds(10)
|
||||
};
|
||||
// context.Response.Headers[Microsoft.Net.Http.Headers.HeaderNames.Vary] =
|
||||
// new string[] { "Accept-Encoding" };
|
||||
context.Response.Headers[Microsoft.Net.Http.Headers.HeaderNames.Vary] =
|
||||
new string[] { "Accept-Encoding" };
|
||||
|
||||
await next();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user