Redirect hotlink instead of 403. Fixes #69
This commit is contained in:
parent
e6d79eb5cf
commit
9cf55ac687
@ -28,7 +28,7 @@ func fileServeHandler(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||
u, _ := url.Parse(referer)
|
||||
p, _ := url.Parse(Config.siteURL)
|
||||
if referer != "" && !sameOrigin(u, p) {
|
||||
w.WriteHeader(403)
|
||||
http.Redirect(w, r, Config.sitePath+fileName, 303)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user