@sap-ux/ui5-proxy-middleware 1.1.32 → 1.1.34

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/README.md CHANGED
@@ -113,8 +113,11 @@ server:
113
113
  Alternatively you can only use the underlying proxy function, e.g. for the case when you want to incorporate the `ui5-proxy-middleware` functionality in your own middleware.
114
114
 
115
115
  ```Typescript
116
+ import { Router } from 'express';
116
117
  import { ui5Proxy } from '@sap-ux/ui5-proxy-middleware';
117
- const ui5ProxyMiddlewareFn = ui5Proxy(config, options, filter)
118
+
119
+ const router = Router();
120
+ router.use("/resources/", ui5Proxy({ path: "/", url: "https://ui5.sap.com"})/*, options, filter*/);
118
121
  ```
119
122
  - **config** - The UI5 configuration
120
123
  - **options** - Options of the [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware#options)
@@ -180,7 +180,11 @@ const setHtmlResponse = (res, html) => {
180
180
  res.end();
181
181
  }
182
182
  else {
183
- res.status(200).contentType('html').send(html);
183
+ res.writeHead(200, {
184
+ 'Content-Type': 'text/html'
185
+ });
186
+ res.write(html);
187
+ res.end();
184
188
  }
185
189
  };
186
190
  exports.setHtmlResponse = setHtmlResponse;
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%3Aui5-proxy-middleware"
11
11
  },
12
- "version": "1.1.32",
12
+ "version": "1.1.34",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -27,17 +27,17 @@
27
27
  "i18next": "20.3.2",
28
28
  "proxy-from-env": "1.1.0",
29
29
  "@sap-ux/logger": "0.3.7",
30
- "@sap-ux/ui5-config": "0.18.2"
30
+ "@sap-ux/ui5-config": "0.19.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/express": "4.17.13",
33
+ "@types/express": "4.17.17",
34
34
  "@types/supertest": "2.0.12",
35
35
  "@types/proxy-from-env": "1.0.1",
36
36
  "express": "4.18.2",
37
37
  "nock": "13.2.4",
38
38
  "supertest": "6.3.2",
39
39
  "yaml": "2.2.2",
40
- "@sap-ux/project-access": "1.11.1"
40
+ "@sap-ux/project-access": "1.13.1"
41
41
  },
42
42
  "ui5": {
43
43
  "dependencies": []