mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(api): rm Vary header to allow Cloudflare to cache
This commit is contained in:
parent
43c0e16d5f
commit
5977acf4f7
1 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,14 @@
|
|||
|
||||
app.UseExceptionHandler();
|
||||
app.UseCors();
|
||||
|
||||
// TEMP: allow Cloudflare to cache all responses since data changes infrequently
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
await next();
|
||||
context.Response.Headers.Remove("Vary");
|
||||
});
|
||||
|
||||
app.MapEndpoints();
|
||||
app.MapDefaultEndpoints();
|
||||
app.UseSwagger(o => o.RouteTemplate = "{documentName}/openapi.json");
|
||||
|
|
|
|||
Loading…
Reference in a new issue