core/ui: no-cache html, force back (#5264)

This commit is contained in:
Caleb Doxsey 2024-09-05 10:39:50 -06:00 committed by GitHub
parent fb4ee25763
commit 97bf5edc54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -52,7 +52,8 @@ func ServePage(w http.ResponseWriter, r *http.Request, page, title string, data
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
}

View file

@ -17,7 +17,11 @@ type SignOutConfirmPageProps = {
const SignOutConfirmPage: FC<SignOutConfirmPageProps> = ({ data }) => {
function handleClickCancel(evt: React.MouseEvent) {
evt.preventDefault();
history.back();
if (document.referrer) {
location.href = document.referrer;
} else {
history.back();
}
}
function handleClickLogout(evt: React.MouseEvent) {