@nocobase/plugin-action-custom-request 2.1.0-beta.12 → 2.1.0-beta.14

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.
@@ -8,23 +8,23 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-beta.12",
11
+ "@nocobase/client": "2.1.0-beta.14",
12
12
  "react": "18.2.0",
13
13
  "react-i18next": "11.18.6",
14
14
  "@formily/react": "2.3.7",
15
- "@nocobase/logger": "2.1.0-beta.12",
16
- "@nocobase/server": "2.1.0-beta.12",
17
- "@nocobase/test": "2.1.0-beta.12",
15
+ "@nocobase/logger": "2.1.0-beta.14",
16
+ "@nocobase/server": "2.1.0-beta.14",
17
+ "@nocobase/test": "2.1.0-beta.14",
18
18
  "@formily/antd-v5": "1.2.3",
19
- "lodash": "4.17.21",
20
- "@nocobase/utils": "2.1.0-beta.12",
19
+ "lodash": "4.18.1",
20
+ "@nocobase/utils": "2.1.0-beta.14",
21
21
  "antd": "5.24.2",
22
22
  "file-saver": "2.0.5",
23
23
  "@formily/shared": "2.3.7",
24
- "@nocobase/flow-engine": "2.1.0-beta.12",
24
+ "@nocobase/flow-engine": "2.1.0-beta.14",
25
25
  "@emotion/css": "11.13.0",
26
- "@nocobase/actions": "2.1.0-beta.12",
27
- "@nocobase/evaluators": "2.1.0-beta.12",
26
+ "@nocobase/actions": "2.1.0-beta.14",
27
+ "@nocobase/evaluators": "2.1.0-beta.14",
28
28
  "axios": "1.7.7",
29
- "@nocobase/database": "2.1.0-beta.12"
29
+ "@nocobase/database": "2.1.0-beta.14"
30
30
  };
@@ -202,6 +202,8 @@ async function send(ctx, next) {
202
202
  const axiosRequestConfig = {
203
203
  baseURL: ctx.origin,
204
204
  ...options,
205
+ // safeRequest checks this url value (before baseURL combination) so that
206
+ // relative paths pointing to the same server are not subject to the whitelist.
205
207
  url: getParsedValue(url, variables),
206
208
  headers: {
207
209
  Authorization: "Bearer " + ctx.getBearerToken(),
@@ -223,7 +225,7 @@ async function send(ctx, next) {
223
225
  })}`
224
226
  );
225
227
  try {
226
- const res = await (0, import_axios.default)(axiosRequestConfig);
228
+ const res = await (0, import_utils.serverRequest)(axiosRequestConfig);
227
229
  this.logger.info(`custom-request:send:${filterByTk} success`);
228
230
  ctx.body = res.data;
229
231
  if (res.headers["content-disposition"]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-action-custom-request",
3
- "version": "2.1.0-beta.12",
3
+ "version": "2.1.0-beta.14",
4
4
  "main": "dist/server/index.js",
5
5
  "homepage": "https://docs.nocobase.com/handbook/action-custom-request",
6
6
  "homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/action-custom-request",
@@ -31,7 +31,7 @@
31
31
  "@nocobase/server": "2.x",
32
32
  "@nocobase/test": "2.x"
33
33
  },
34
- "gitHead": "25cee9643f42f850afc4adc33c55a56850ac730d",
34
+ "gitHead": "cd55c9a14596d834c30c83a82c38f1f719f7aac4",
35
35
  "keywords": [
36
36
  "Actions"
37
37
  ]