docker: allow requests via libpod and skopeo
This commit is contained in:
+1
-4
@@ -318,10 +318,7 @@ server {
|
||||
}
|
||||
|
||||
location @proxy-auth-login {
|
||||
if ($http_user_agent ~* "docker") {
|
||||
return 401;
|
||||
}
|
||||
if ($http_user_agent ~* "container") {
|
||||
if ($http_user_agent ~* "docker|container|libpod|skopeo") {
|
||||
return 401;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ function isBrowser(req) {
|
||||
if (!userAgent) return false;
|
||||
|
||||
// https://github.com/docker/engine/blob/master/dockerversion/useragent.go#L18
|
||||
return !userAgent.toLowerCase().includes('docker') && !userAgent.toLowerCase().includes('container');
|
||||
return !/docker|container|libpod|skopeo/i.test(userAgent);
|
||||
}
|
||||
|
||||
// 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