Updated userinfo middleware
This commit is contained in:
parent
9b0d20164f
commit
39e445bf71
@ -19,12 +19,9 @@ func UserInfo() aero.Middleware {
|
||||
next()
|
||||
|
||||
// Ignore non-HTML requests
|
||||
if aero.IsMediaType(ctx.Response().Header().Get("Content-Type")) {
|
||||
return
|
||||
}
|
||||
contentType := ctx.Response().Header().Get("Content-Type")
|
||||
|
||||
// Ignore API requests
|
||||
if strings.HasPrefix(ctx.URI(), "/api/") {
|
||||
if !strings.HasPrefix(contentType, "text/html") {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user