don't allow posts from blocked hosts

This commit is contained in:
Ted Unangst 2019-09-22 15:36:06 -04:00
parent 33b2080d38
commit 86fb8cdfc6
1 changed files with 4 additions and 0 deletions

4
web.go
View File

@ -248,6 +248,10 @@ func inbox(w http.ResponseWriter, r *http.Request) {
http.NotFound(w, r)
return
}
if stealthmode(user.ID, r) {
http.NotFound(w, r)
return
}
var buf bytes.Buffer
io.Copy(&buf, r.Body)
payload := buf.Bytes()