Browse Source

fix(admin-ui-plugin): proxy target template string (#3514)

Casper Iversen 9 months ago
parent
commit
8e6a991fd6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/core/src/plugin/plugin-utils.ts

+ 1 - 1
packages/core/src/plugin/plugin-utils.ts

@@ -39,7 +39,7 @@ export function createProxyHandler(options: ProxyOptions): RequestHandler {
     const proxyHostname = options.hostname || 'localhost';
     const middleware = createProxyMiddleware({
         // TODO: how do we detect https?
-        target: `http://${proxyHostname}:${options.port}/(options.basePath || '')`,
+        target: `http://${proxyHostname}:${options.port}/${options.basePath ?? ''}`,
         pathRewrite: {
             [`^${route}`]: '/' + (options.basePath || ''),
         },