Redirect hotlink instead of 403. Fixes #69

This commit is contained in:
andreimarcu 2015-11-12 00:56:22 -05:00
parent e6d79eb5cf
commit 9cf55ac687
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ func fileServeHandler(c web.C, w http.ResponseWriter, r *http.Request) {
u, _ := url.Parse(referer) u, _ := url.Parse(referer)
p, _ := url.Parse(Config.siteURL) p, _ := url.Parse(Config.siteURL)
if referer != "" && !sameOrigin(u, p) { if referer != "" && !sameOrigin(u, p) {
w.WriteHeader(403) http.Redirect(w, r, Config.sitePath+fileName, 303)
return return
} }
} }