Skip to content

Commit

Permalink
add meta-equiv redirect backup
Browse files Browse the repository at this point in the history
  • Loading branch information
tenox7 committed May 2, 2023
1 parent 8c426d5 commit 3a9fb3c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions web.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,15 @@ func redirect(w http.ResponseWriter, uUrl string) {
w.Header().Set("Cache-Control", *cacheCtl)
w.WriteHeader(302)

w.Write([]byte(`<HTML><BODY>
<A HREF="` + html.EscapeString(uUrl) + `">Go here...</A>
</BODY></HTML>
u := html.EscapeString(uUrl)
w.Write([]byte(`<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" CONTENT="0; URL=` + u + `">
</HEAD>
<BODY>
If you see this, your browser did not redirect. <A HREF="` + u + `">Click here...</A>
</BODY>
</HTML>
`))
}

Expand Down

0 comments on commit 3a9fb3c

Please sign in to comment.