From c63d5027af221ca1cd21af74908bde22415c7195 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")