refactor: add no cache headers
This commit is contained in:
parent
ac61279081
commit
6ac37cfe65
|
@ -166,6 +166,10 @@ func ClearAuthCookie(jc jape.Context, apiName string) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jc.ResponseWriter.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
||||||
|
jc.ResponseWriter.Header().Set("Pragma", "no-cache")
|
||||||
|
jc.ResponseWriter.Header().Set("Expires", "0")
|
||||||
|
|
||||||
http.SetCookie(jc.ResponseWriter, &http.Cookie{
|
http.SetCookie(jc.ResponseWriter, &http.Cookie{
|
||||||
Name: routeableApi.AuthTokenName(),
|
Name: routeableApi.AuthTokenName(),
|
||||||
Value: "deleted",
|
Value: "deleted",
|
||||||
|
@ -175,5 +179,6 @@ func ClearAuthCookie(jc jape.Context, apiName string) {
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Domain: routeableApi.Domain(),
|
Domain: routeableApi.Domain(),
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue