Redirect traffic to the stylized paste page

This commit is contained in:
Eliot Whalan 2016-06-23 19:06:24 +10:00
parent e02fb51fe0
commit c63d5027af
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")