diff --git a/Sources/VaporOAuth/RouteHandlers/UserInfoHandler.swift b/Sources/VaporOAuth/RouteHandlers/UserInfoHandler.swift index 2f3e61c..0a521c6 100644 --- a/Sources/VaporOAuth/RouteHandlers/UserInfoHandler.swift +++ b/Sources/VaporOAuth/RouteHandlers/UserInfoHandler.swift @@ -13,7 +13,7 @@ struct UserInfoHandler { // Enforce HTTPS in production environment if environment == .production { - guard req.url.scheme == "https" else { + guard req.url.scheme != "https" else { throw Abort(.badRequest, reason: "UserInfo endpoint requires HTTPS") } }