Updated userinfo middleware

This commit is contained in:
Eduard Urbach 2018-03-25 17:32:42 +02:00
parent 9b0d20164f
commit 39e445bf71

View File

@ -19,12 +19,9 @@ func UserInfo() aero.Middleware {
next() next()
// Ignore non-HTML requests // Ignore non-HTML requests
if aero.IsMediaType(ctx.Response().Header().Get("Content-Type")) { contentType := ctx.Response().Header().Get("Content-Type")
return
}
// Ignore API requests if !strings.HasPrefix(contentType, "text/html") {
if strings.HasPrefix(ctx.URI(), "/api/") {
return return
} }