Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: force redirect to not be cached (#473)

Guilherme Oenningdf8922d34b6b
diff --git a/app/pkg/web/context.go b/app/pkg/web/context.go
index c5a4f5822..56a082bac 100644
--- a/app/pkg/web/context.go
+++ b/app/pkg/web/context.go
@@ -452,6 +452,7 @@ func (ctx *Context) NoContent(code int) error {
// Redirect the request to a provided URL
func (ctx *Context) Redirect(url string) error {
+ ctx.Response.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
ctx.Response.Header().Set("Location", url)
ctx.Response.WriteHeader(http.StatusTemporaryRedirect)
return nil