Skip to content

Commit 344bda6

Browse files
authored
Merge pull request #1925 from riganti/virtual-SetCacheHeaders
Make SetCacheHeaders protected virtual, and add no-store to the header
2 parents 630c685 + 75253d3 commit 344bda6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Framework/Framework/Runtime/DefaultOutputRenderer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ public virtual async Task RenderPlainTextResponse(IHttpContext context, string t
136136
await context.Response.WriteAsync(text);
137137
}
138138

139-
private static void SetCacheHeaders(IHttpContext context)
139+
protected virtual void SetCacheHeaders(IHttpContext context)
140140
{
141-
context.Response.Headers["Cache-Control"] = "no-cache";
141+
context.Response.Headers["Cache-Control"] = "no-cache, no-store";
142142
context.Response.Headers["Pragma"] = "no-cache";
143143
context.Response.Headers["Expires"] = "-1";
144144
}

0 commit comments

Comments
 (0)