feat(api): rm Vary header to allow Cloudflare to cache

This commit is contained in:
Collin Barrett 2025-05-31 11:14:34 -05:00 committed by Collin Barrett
parent 43c0e16d5f
commit 5977acf4f7

View file

@ -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");