@sap-ux/backend-proxy-middleware 0.10.8 → 0.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/proxy.js +4 -2
- package/package.json +3 -3
package/dist/base/proxy.js
CHANGED
|
@@ -299,8 +299,8 @@ async function generateProxyMiddlewareOptions(backend, options = {}, logger = ne
|
|
|
299
299
|
},
|
|
300
300
|
...options,
|
|
301
301
|
changeOrigin: true,
|
|
302
|
-
target: backend.url
|
|
303
|
-
pathRewrite
|
|
302
|
+
target: backend.url
|
|
303
|
+
//'pathRewrite' will be set later because it depends on subsequent settings
|
|
304
304
|
};
|
|
305
305
|
// overwrite url if running in AppStudio
|
|
306
306
|
if ((0, btp_utils_1.isAppStudio)()) {
|
|
@@ -317,6 +317,8 @@ async function generateProxyMiddlewareOptions(backend, options = {}, logger = ne
|
|
|
317
317
|
if (!proxyOptions.auth && process.env.FIORI_TOOLS_USER && process.env.FIORI_TOOLS_PASSWORD) {
|
|
318
318
|
proxyOptions.auth = `${process.env.FIORI_TOOLS_USER}:${process.env.FIORI_TOOLS_PASSWORD}`;
|
|
319
319
|
}
|
|
320
|
+
// IMPORTANT: setting the pathRewrite must (!) be done after 'enhanceConfigsForDestination' because this function possibly modifies 'backend.path' and 'backend.pathReplace' that is being used in the pathRewrite
|
|
321
|
+
proxyOptions.pathRewrite = exports.PathRewriters.getPathRewrite(backend, logger);
|
|
320
322
|
if (backend.bsp) {
|
|
321
323
|
await (0, bsp_1.addOptionsForEmbeddedBSP)(backend.bsp, proxyOptions, logger);
|
|
322
324
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Abackend-proxy-middleware"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.10.
|
|
12
|
+
"version": "0.10.10",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"i18next": "25.3.0",
|
|
29
29
|
"prompts": "2.4.2",
|
|
30
30
|
"proxy-from-env": "1.1.0",
|
|
31
|
-
"@sap-ux/axios-extension": "1.24.
|
|
32
|
-
"@sap-ux/btp-utils": "1.1.4",
|
|
31
|
+
"@sap-ux/axios-extension": "1.24.1",
|
|
33
32
|
"@sap-ux/logger": "0.7.0",
|
|
33
|
+
"@sap-ux/btp-utils": "1.1.4",
|
|
34
34
|
"@sap-ux/store": "1.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|