From 19c919d1e4455ed7ac896a0c5dd84f6674f738c7 Mon Sep 17 00:00:00 2001
From: Paul Richardson
Date: Wed, 15 May 2024 17:21:51 +0100
Subject: [PATCH] fix: Allow URIs to handle search parameters (HAWNG-680)
* Namespaces, projects and pods need to use search parameters, eg.
projectSelector, if the user specifies them in the config. Modifies URI
patterns to handle such endpoints.
---
docker/nginx.js | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/docker/nginx.js b/docker/nginx.js
index 8c2ddaf5..b214cd53 100644
--- a/docker/nginx.js
+++ b/docker/nginx.js
@@ -30,13 +30,11 @@ var masterUrlPatterns = [
// OpenShift Current User
/\/master\/apis\/user.openshift.io\/v1\/users\/~$/,
// OpenShift projects (for cluster-mode)
- /\/master\/apis\/project.openshift.io\/v1\/projects$/,
+ /\/master\/apis\/project.openshift.io\/v1\/projects(\?.*)?/,
// Kubernetes namespaces (for cluster-mode)
- /\/master\/api\/v1\/namespaces$/,
+ /\/master\/api\/v1\/namespaces(\?.*)?/,
// Kubernetes Pods in a wildcard namespace to be converted to websocket
- /\/master\/api\/v1\/namespaces\/[0-9a-zA-Z-]+\/pods\?watch=true$/,
- // Kubernetes Pods in a wildcard namespace
- /\/master\/api\/v1\/namespaces\/[0-9a-zA-Z-]+\/pods$/,
+ /\/master\/api\/v1\/namespaces\/[0-9a-zA-Z-]+\/pods(\?.*)?/,
// Query for the uri of the OpenShift web console
/\/master\/api\/v1\/namespaces\/openshift-config-managed\/configmaps\/console-public/
]