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
24181737
Commit
24181737
authored
Jun 22, 2015
by
Jeff Lowdermilk
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9963 from smarterclayton/add_options_to_proxy
OPTIONS should be passed through the proxy
parents
1559fa8b
e7aedf29
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
377 additions
and
0 deletions
+377
-0
v1.json
api/swagger-spec/v1.json
+188
-0
v1beta3.json
api/swagger-spec/v1beta3.json
+188
-0
api_installer.go
pkg/apiserver/api_installer.go
+1
-0
No files found.
api/swagger-spec/v1.json
View file @
24181737
...
@@ -3365,6 +3365,36 @@
...
@@ -3365,6 +3365,36 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Node"
,
"nickname"
:
"proxyOPTIONSNode"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Node"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"path:*"
,
"description"
:
"path to the resource"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -3481,6 +3511,28 @@
...
@@ -3481,6 +3511,28 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Node"
,
"nickname"
:
"proxyOPTIONSNode"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Node"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -5415,6 +5467,44 @@
...
@@ -5415,6 +5467,44 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Pod"
,
"nickname"
:
"proxyOPTIONSPod"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Pod"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"path:*"
,
"description"
:
"path to the resource"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -5571,6 +5661,36 @@
...
@@ -5571,6 +5661,36 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Pod"
,
"nickname"
:
"proxyOPTIONSPod"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Pod"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -10445,6 +10565,44 @@
...
@@ -10445,6 +10565,44 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Service"
,
"nickname"
:
"proxyOPTIONSService"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Service"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"path:*"
,
"description"
:
"path to the resource"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -10601,6 +10759,36 @@
...
@@ -10601,6 +10759,36 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Service"
,
"nickname"
:
"proxyOPTIONSService"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Service"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
...
api/swagger-spec/v1beta3.json
View file @
24181737
...
@@ -3365,6 +3365,36 @@
...
@@ -3365,6 +3365,36 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Node"
,
"nickname"
:
"proxyOPTIONSNode"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Node"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"path:*"
,
"description"
:
"path to the resource"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -3481,6 +3511,28 @@
...
@@ -3481,6 +3511,28 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Node"
,
"nickname"
:
"proxyOPTIONSNode"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Node"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -5415,6 +5467,44 @@
...
@@ -5415,6 +5467,44 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Pod"
,
"nickname"
:
"proxyOPTIONSPod"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Pod"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"path:*"
,
"description"
:
"path to the resource"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -5571,6 +5661,36 @@
...
@@ -5571,6 +5661,36 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Pod"
,
"nickname"
:
"proxyOPTIONSPod"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Pod"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -10445,6 +10565,44 @@
...
@@ -10445,6 +10565,44 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Service"
,
"nickname"
:
"proxyOPTIONSService"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Service"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"path:*"
,
"description"
:
"path to the resource"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
@@ -10601,6 +10759,36 @@
...
@@ -10601,6 +10759,36 @@
"consumes"
:
[
"consumes"
:
[
"*/*"
"*/*"
]
]
},
{
"type"
:
"string"
,
"method"
:
"OPTIONS"
,
"summary"
:
"proxy OPTIONS requests to Service"
,
"nickname"
:
"proxyOPTIONSService"
,
"parameters"
:
[
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"namespaces"
,
"description"
:
"object name and auth scope, such as for teams and projects"
,
"required"
:
true
,
"allowMultiple"
:
false
},
{
"type"
:
"string"
,
"paramType"
:
"path"
,
"name"
:
"name"
,
"description"
:
"name of the Service"
,
"required"
:
true
,
"allowMultiple"
:
false
}
],
"produces"
:
[
"*/*"
],
"consumes"
:
[
"*/*"
]
}
}
]
]
},
},
...
...
pkg/apiserver/api_installer.go
View file @
24181737
...
@@ -547,6 +547,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
...
@@ -547,6 +547,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
addProxyRoute
(
ws
,
"POST"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
addProxyRoute
(
ws
,
"POST"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
addProxyRoute
(
ws
,
"DELETE"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
addProxyRoute
(
ws
,
"DELETE"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
addProxyRoute
(
ws
,
"HEAD"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
addProxyRoute
(
ws
,
"HEAD"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
addProxyRoute
(
ws
,
"OPTIONS"
,
a
.
prefix
,
action
.
Path
,
proxyHandler
,
kind
,
resource
,
subresource
,
hasSubresource
,
action
.
Params
)
case
"CONNECT"
:
case
"CONNECT"
:
for
_
,
method
:=
range
connecter
.
ConnectMethods
()
{
for
_
,
method
:=
range
connecter
.
ConnectMethods
()
{
doc
:=
"connect "
+
method
+
" requests to "
+
kind
doc
:=
"connect "
+
method
+
" requests to "
+
kind
...
...
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