Browse Source

Fix /nr

Related issue: #68
master
Daan Sprenkels 4 months ago
parent
commit
50baaeadf1
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      handlers.go

+ 4
- 2
handlers.go View File

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


Loading…
Cancel
Save