mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 21:53:52 +00:00
Made blacklist stricter to deal with alternate versions of true
This commit is contained in:
@@ -28,13 +28,13 @@ data:
|
|||||||
|
|
||||||
# Allow for REST discovery.
|
# Allow for REST discovery.
|
||||||
location = / {
|
location = / {
|
||||||
if ($args ~ "recursive=true") {
|
if ($args ~* "recursive") {
|
||||||
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
||||||
}
|
}
|
||||||
proxy_pass http://169.254.169.254;
|
proxy_pass http://169.254.169.254;
|
||||||
}
|
}
|
||||||
location = /computeMetadata/ {
|
location = /computeMetadata/ {
|
||||||
if ($args ~ "recursive=true") {
|
if ($args ~* "recursive") {
|
||||||
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
||||||
}
|
}
|
||||||
proxy_pass http://169.254.169.254;
|
proxy_pass http://169.254.169.254;
|
||||||
@@ -42,19 +42,19 @@ data:
|
|||||||
|
|
||||||
# By default, allow the v0.1, v1beta1, and v1 APIs.
|
# By default, allow the v0.1, v1beta1, and v1 APIs.
|
||||||
location /0.1/ {
|
location /0.1/ {
|
||||||
if ($args ~ "recursive=true") {
|
if ($args ~* "recursive") {
|
||||||
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
||||||
}
|
}
|
||||||
proxy_pass http://169.254.169.254;
|
proxy_pass http://169.254.169.254;
|
||||||
}
|
}
|
||||||
location /computeMetadata/v1beta1/ {
|
location /computeMetadata/v1beta1/ {
|
||||||
if ($args ~ "recursive=true") {
|
if ($args ~* "recursive") {
|
||||||
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
||||||
}
|
}
|
||||||
proxy_pass http://169.254.169.254;
|
proxy_pass http://169.254.169.254;
|
||||||
}
|
}
|
||||||
location /computeMetadata/v1/ {
|
location /computeMetadata/v1/ {
|
||||||
if ($args ~ "recursive=true") {
|
if ($args ~* "recursive") {
|
||||||
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
return 403 "?recursive calls are not allowed by the metadata proxy.";
|
||||||
}
|
}
|
||||||
proxy_pass http://169.254.169.254;
|
proxy_pass http://169.254.169.254;
|
||||||
|
Reference in New Issue
Block a user