Redirect traffic to the stylized paste page

This commit is contained in:
Eliot Whalan 2016-06-23 19:06:24 +10:00
parent b6f08fd243
commit 7f5d1cc7ca
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 3 additions and 0 deletions

View File

@ -178,6 +178,9 @@ func saveHandler(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "<p><b>URL</b>: <a href='"+b.URL+"'>"+b.URL+"</a></p>") io.WriteString(w, "<p><b>URL</b>: <a href='"+b.URL+"'>"+b.URL+"</a></p>")
io.WriteString(w, "<p><b>Delete Key</b>: <a href='"+ADDRESS+"/del/"+b.ID+"/"+b.DELKEY+"'>"+b.DELKEY+"</a></p>") io.WriteString(w, "<p><b>Delete Key</b>: <a href='"+ADDRESS+"/del/"+b.ID+"/"+b.DELKEY+"'>"+b.DELKEY+"</a></p>")
case "redirect":
http.Redirect(w, r, b.URL, 301)
default: default:
w.Header().Set("Content-Type", "plain/text") w.Header().Set("Content-Type", "plain/text")
io.WriteString(w, b.URL+"\n") io.WriteString(w, b.URL+"\n")