all repos — honk @ c12ec1f0c14f5ace784428a69e2d21ddf89b2434

my fork of honk

return 406 not acceptable for donks as honks
Ted Unangst tedu@tedunangst.com
Fri, 16 Feb 2024 13:32:00 -0500
commit

c12ec1f0c14f5ace784428a69e2d21ddf89b2434

parent

4bcdb41917bc40783a4ecfedf4c5f7a8ccce663f

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M web.goweb.go

@@ -2393,6 +2393,11 @@ }

} func servefile(w http.ResponseWriter, r *http.Request) { + if friendorfoe(r.Header.Get("Accept")) { + dlog.Printf("incompatible accept for donk") + http.Error(w, "there are no activities here", http.StatusNotAcceptable) + return + } xid := mux.Vars(r)["xid"] preview := r.FormValue("preview") == "1" var media string