Skip to content

Commit 006dbc2

Browse files
authored
Merge pull request #8457 from rancher-sandbox/dependabot/npm_and_yarn/express-5.1.0
build(deps): bump express from 4.21.2 to 5.1.0
2 parents 690daa2 + 11e43b7 commit 006dbc2

4 files changed

Lines changed: 295 additions & 25 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"dayjs": "1.11.13",
6464
"dompurify": "3.2.5",
6565
"electron-updater": "6.3.9",
66-
"express": "4.21.2",
66+
"express": "5.1.0",
6767
"fs-extra": "11.3.0",
6868
"http-proxy-middleware": "3.0.3",
6969
"intl-messageformat": "10.7.16",

pkg/rancher-desktop/main/commandServer/httpCommandServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export class HttpCommandServer {
183183
this.listEndpoints('', req, resp);
184184
});
185185
// Set up catch-all handler for customized HTTP 404 message.
186-
this.app.all('*', ({ method, path }, resp) => {
186+
this.app.all('*missing', ({ method, path }, resp) => {
187187
console.log(`404: No handler for URL ${ method } ${ path }.`);
188188
resp.status(404).type('txt').send(`Unknown command: ${ method } ${ path }`);
189189
});

pkg/rancher-desktop/main/dashboardServer/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { proxyWsOpts, proxyOpts } from './proxyUtils';
1010
import Logging from '@pkg/utils/logging';
1111
import paths from '@pkg/utils/paths';
1212

13-
const ProxyKeys = ['/k8s', '/pp', '/api', '/apis', '/v1', '/v3', '/v3-public', '/api-ui', '/meta', '/v1-*'] as const;
13+
const ProxyKeys = ['/k8s', '/pp', '/api', '/apis', '/v1', '/v3', '/v3-public', '/api-ui', '/meta', '/v1-*etc'] as const;
1414

1515
type ProxyKeys = typeof ProxyKeys[number];
1616

@@ -39,7 +39,7 @@ export class DashboardServer {
3939
'/api-ui': proxyOpts, // Browser API UI
4040
'/v3-public': proxyOpts, // Rancher Unauthed API
4141
'/meta': proxyOpts, // Browser API UI
42-
'/v1-*': proxyOpts, // SAML, KDM, etc
42+
'/v1-*etc': proxyOpts, // SAML, KDM, etc
4343
};
4444
const entries = Object.entries(proxy).map(([key, options]) => {
4545
return [key, createProxyMiddleware({ ...options, target: this.api + key })] as const;
@@ -83,7 +83,7 @@ export class DashboardServer {
8383
* Vue router take over.
8484
*/
8585
.get(
86-
'*',
86+
'*missing',
8787
(_req, res) => {
8888
res.sendFile(
8989
path.resolve(paths.resources, 'rancher-dashboard', 'index.html'),

0 commit comments

Comments
 (0)