Fixing sign in / out redirect
This commit is contained in:
@@ -84,9 +84,13 @@ func servePublicFile(w http.ResponseWriter, r *http.Request) {
|
||||
path := r.URL.Path
|
||||
|
||||
if path == "/" {
|
||||
w.Header().Set("Cache-Control", "no-store")
|
||||
|
||||
// Required for sign in / sign out redirect to work properly
|
||||
w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate")
|
||||
w.Header().Set("Pragma", "no-cache")
|
||||
w.Header().Set("Expires", "0")
|
||||
w.Header().Set("Surrogate-Control", "no-store")
|
||||
|
||||
path = "/index.html"
|
||||
} else if !strings.Contains(path, ".") {
|
||||
path = filepath.Join("/pages", path) + ".html"
|
||||
@@ -114,6 +118,13 @@ func serveSiteFiles(w http.ResponseWriter, r *http.Request) {
|
||||
path := r.URL.Path
|
||||
|
||||
if path == "/" {
|
||||
|
||||
// Required for sign in / sign out redirect to work properly
|
||||
w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate")
|
||||
w.Header().Set("Pragma", "no-cache")
|
||||
w.Header().Set("Expires", "0")
|
||||
w.Header().Set("Surrogate-Control", "no-store")
|
||||
|
||||
path = "/index.html"
|
||||
} else if !strings.Contains(path, ".") {
|
||||
path = filepath.Join("/pages", path) + ".html"
|
||||
|
||||
Reference in New Issue
Block a user