Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.UseStaticFiles(new StaticFileOptions()
- {
- ServeUnknownFileTypes = true,
- OnPrepareResponse = context =>
- {
- context.Context.Response.Headers["test"] = "ok"; // this work
- context.Context.Response.Headers[HeaderNames.CacheControl] = "public, max-age=1296000, must-revalidate"; // doesn't work => always respond "no-store, must-revalidate, no-cache"
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement