Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6f4ee0d2
Commit
6f4ee0d2
authored
Aug 30, 2017
by
Isaac Hollander McCreery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regex's and redirect port
parent
86c0579e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
metadata-proxy-configmap.yaml
...r/addons/metadata-proxy/gce/metadata-proxy-configmap.yaml
+7
-5
No files found.
cluster/addons/metadata-proxy/gce/metadata-proxy-configmap.yaml
View file @
6f4ee0d2
...
@@ -20,6 +20,8 @@ data:
...
@@ -20,6 +20,8 @@ data:
access_log /dev/stdout;
access_log /dev/stdout;
server {
server {
listen 127.0.0.1:988;
listen 127.0.0.1:988;
# When serving 301s, don't redirect to port 988.
port_in_redirect off;
# By default, return 403. This protects us from new API versions.
# By default, return 403. This protects us from new API versions.
location / {
location / {
...
@@ -28,13 +30,13 @@ data:
...
@@ -28,13 +30,13 @@ data:
# Allow for REST discovery.
# Allow for REST discovery.
location = / {
location = / {
if ($args ~* "
recursive
") {
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
") {
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 +44,19 @@ data:
...
@@ -42,19 +44,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
") {
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
") {
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
") {
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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment