diff --git a/ui/embed.go b/ui/embed.go index 4162c0d21..6ad8436d8 100644 --- a/ui/embed.go +++ b/ui/embed.go @@ -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 } diff --git a/ui/src/components/SignOutConfirmPage.tsx b/ui/src/components/SignOutConfirmPage.tsx index b7c57a6cf..68474fc6b 100644 --- a/ui/src/components/SignOutConfirmPage.tsx +++ b/ui/src/components/SignOutConfirmPage.tsx @@ -17,7 +17,11 @@ type SignOutConfirmPageProps = { const SignOutConfirmPage: FC = ({ 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) {