mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
core/ui: no-cache html, force back (#5264)
This commit is contained in:
parent
fb4ee25763
commit
97bf5edc54
2 changed files with 7 additions and 2 deletions
|
@ -52,7 +52,8 @@ func ServePage(w http.ResponseWriter, r *http.Request, page, title string, data
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
http.ServeContent(w, r, "index.html", time.Now(), bytes.NewReader(bs))
|
w.Header().Set("Cache-Control", "no-cache, must-revalidate")
|
||||||
|
http.ServeContent(w, r, "index.html", time.Time{}, bytes.NewReader(bs))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,12 @@ type SignOutConfirmPageProps = {
|
||||||
const SignOutConfirmPage: FC<SignOutConfirmPageProps> = ({ data }) => {
|
const SignOutConfirmPage: FC<SignOutConfirmPageProps> = ({ data }) => {
|
||||||
function handleClickCancel(evt: React.MouseEvent) {
|
function handleClickCancel(evt: React.MouseEvent) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
if (document.referrer) {
|
||||||
|
location.href = document.referrer;
|
||||||
|
} else {
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleClickLogout(evt: React.MouseEvent) {
|
function handleClickLogout(evt: React.MouseEvent) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
Loading…
Add table
Reference in a new issue