BakaBakaBaka

This commit is contained in:
daru
2022-04-18 22:03:03 +02:00
parent 3cde8c7c1c
commit 171fd41c1c

View File

@@ -44,7 +44,7 @@ func Start(ctx *fasthttp.RequestCtx) {
func AuthTest(ctx *fasthttp.RequestCtx) {
auth := ctx.Request.Header.Peek("X-HUSO-AUTH")
if ctx.UserValue("user") == nil || auth == nil || string(auth) == "" || string(ctx.Request.Header.ContentType()) != "application/json" {
if ctx.UserValue("user") == nil || auth == nil || string(auth) == "" {
ctx.SetStatusCode(fasthttp.StatusBadRequest)
return
}