Related issue: #68
This commit is contained in:
Daan Sprenkels 2020-07-27 16:57:55 +02:00
parent 26be9b5104
commit 50baaeadf1

View File

@ -142,9 +142,11 @@ func (rl *rushlink) viewPasteHandlerInner(w http.ResponseWriter, r *http.Request
rl.viewFileUploadHandler(w, r, fu) rl.viewFileUploadHandler(w, r, fu)
return return
case db.PasteTypeRedirect: case db.PasteTypeRedirect:
if flags&viewNoRedirect == 0 { if flags&viewNoRedirect != 0 {
http.Redirect(w, r, p.RedirectURL().String(), http.StatusTemporaryRedirect) w.Write([]byte(p.RedirectURL().String()))
return
} }
http.Redirect(w, r, p.RedirectURL().String(), http.StatusTemporaryRedirect)
return return
default: default:
panic("paste type unsupported") panic("paste type unsupported")