mirror of https://github.com/portainer/portainer
removed kubeconfig tls check (#5443)
parent
dcb85ad8fe
commit
db1f182670
|
@ -34,14 +34,6 @@ import (
|
||||||
// @failure 500 "Server error"
|
// @failure 500 "Server error"
|
||||||
// @router /kubernetes/{id}/config [get]
|
// @router /kubernetes/{id}/config [get]
|
||||||
func (handler *Handler) getKubernetesConfig(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
func (handler *Handler) getKubernetesConfig(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
||||||
if r.TLS == nil {
|
|
||||||
return &httperror.HandlerError{
|
|
||||||
StatusCode: http.StatusInternalServerError,
|
|
||||||
Message: "Kubernetes config generation only supported on portainer instances running with TLS",
|
|
||||||
Err: errors.New("missing request TLS config"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id")
|
endpointID, err := request.RetrieveNumericRouteVariableValue(r, "id")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err}
|
return &httperror.HandlerError{http.StatusBadRequest, "Invalid endpoint identifier route variable", err}
|
||||||
|
|
Loading…
Reference in New Issue