proxyAuth: Fix docker UA detection
This commit is contained in:
+2
-1
@@ -104,7 +104,8 @@ function isBrowser(req) {
|
||||
const userAgent = req.get('user-agent');
|
||||
if (!userAgent) return false;
|
||||
|
||||
return !userAgent.toLowerCase().includes('docker-client');
|
||||
// https://github.com/docker/engine/blob/master/dockerversion/useragent.go#L18
|
||||
return !userAgent.toLowerCase().includes('docker');
|
||||
}
|
||||
|
||||
// called by nginx to authorize any protected route. this route must return only 2xx or 401/403 (http://nginx.org/en/docs/http/ngx_http_auth_request_module.html)
|
||||
|
||||
Reference in New Issue
Block a user