fix: web terminal due to query parameters name mismatch (#9560)

Signed-off-by: Alexander Matyushentsev <[email protected]>
This commit is contained in:
Alexander Matyushentsev
2022-06-01 14:38:59 -07:00
committed by GitHub
parent 05a93cc9d0
commit db978573be
+3 -3
View File
@@ -94,8 +94,8 @@ func (s *terminalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
podName := q.Get("pod")
container := q.Get("container")
app := q.Get("app")
project := q.Get("project")
app := q.Get("appName")
project := q.Get("projectName")
namespace := q.Get("namespace")
if podName == "" || container == "" || app == "" || project == "" || namespace == "" {
@@ -123,7 +123,7 @@ func (s *terminalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Namespace name is not valid", http.StatusBadRequest)
return
}
shell := q.Get("shell") // No need to validate. Will only buse used if it's in the allow-list.
shell := q.Get("shell") // No need to validate. Will only buse used if it's in the allow-list.
ctx := r.Context()