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