From 7f5d1cc7cab0c0fa7a671fc50ecd874f398dc4ec Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 19:06:24 +1000 Subject: [PATCH] Redirect traffic to the stylized paste page --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 52ff74f..1c9cbb3 100644 --- a/main.go +++ b/main.go @@ -178,6 +178,9 @@ func saveHandler(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "

URL: "+b.URL+"

") io.WriteString(w, "

Delete Key: "+b.DELKEY+"

") + case "redirect": + http.Redirect(w, r, b.URL, 301) + default: w.Header().Set("Content-Type", "plain/text") io.WriteString(w, b.URL+"\n")