Merge pull request #901 from pikasTech/fix/issue898-webui-rum-route
fix: proxy WebUI performance telemetry route
This commit is contained in:
@@ -8,6 +8,7 @@ const POST_PROXY_ROUTES = new Set([
|
||||
"/v1/agent/chat/cancel",
|
||||
"/v1/agent/chat/steer",
|
||||
"/v1/agent/sessions",
|
||||
"/v1/web-performance",
|
||||
"/v1/m3/io",
|
||||
"/v1/skills/uploads"
|
||||
]);
|
||||
@@ -17,7 +18,8 @@ const PUBLIC_PROXY_ROUTES = new Set([
|
||||
"POST /auth/logout",
|
||||
"POST /v1/agent/chat",
|
||||
"POST /v1/agent/chat/cancel",
|
||||
"POST /v1/agent/chat/steer"
|
||||
"POST /v1/agent/chat/steer",
|
||||
"POST /v1/web-performance"
|
||||
]);
|
||||
|
||||
export function cloudWebProxyRoutePolicy(method, pathname) {
|
||||
|
||||
@@ -39,6 +39,15 @@ test("cloud web proxies authenticated REST RPC bridge routes", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("cloud web proxies public WebUI performance telemetry to cloud-api", () => {
|
||||
assert.deepEqual(cloudWebProxyRoutePolicy("POST", "/v1/web-performance"), {
|
||||
proxy: true,
|
||||
authRequired: false,
|
||||
publicRoute: true,
|
||||
routeKey: "POST /v1/web-performance"
|
||||
});
|
||||
});
|
||||
|
||||
test("cloud web proxies authenticated API key management write routes", () => {
|
||||
assert.deepEqual(cloudWebProxyRoutePolicy("POST", "/v1/api-keys"), {
|
||||
proxy: true,
|
||||
|
||||
Reference in New Issue
Block a user