@nocobase/plugin-action-custom-request 2.0.35 → 2.0.37

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,21 +8,21 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.0.35",
11
+ "@nocobase/client": "2.0.37",
12
12
  "react": "18.2.0",
13
13
  "react-i18next": "11.18.6",
14
14
  "@formily/react": "2.3.7",
15
- "@nocobase/logger": "2.0.35",
16
- "@nocobase/server": "2.0.35",
17
- "@nocobase/test": "2.0.35",
15
+ "@nocobase/logger": "2.0.37",
16
+ "@nocobase/server": "2.0.37",
17
+ "@nocobase/test": "2.0.37",
18
18
  "@formily/antd-v5": "1.2.3",
19
19
  "lodash": "4.17.21",
20
- "@nocobase/utils": "2.0.35",
20
+ "@nocobase/utils": "2.0.37",
21
21
  "antd": "5.24.2",
22
22
  "file-saver": "2.0.5",
23
23
  "@formily/shared": "2.3.7",
24
- "@nocobase/actions": "2.0.35",
25
- "@nocobase/evaluators": "2.0.35",
24
+ "@nocobase/actions": "2.0.37",
25
+ "@nocobase/evaluators": "2.0.37",
26
26
  "axios": "1.7.7",
27
- "@nocobase/database": "2.0.35"
27
+ "@nocobase/database": "2.0.37"
28
28
  };
@@ -177,6 +177,8 @@ async function send(ctx, next) {
177
177
  const axiosRequestConfig = {
178
178
  baseURL: ctx.origin,
179
179
  ...options,
180
+ // safeRequest checks this url value (before baseURL combination) so that
181
+ // relative paths pointing to the same server are not subject to the whitelist.
180
182
  url: getParsedValue(url, variables),
181
183
  headers: {
182
184
  Authorization: "Bearer " + ctx.getBearerToken(),
@@ -198,7 +200,7 @@ async function send(ctx, next) {
198
200
  })}`
199
201
  );
200
202
  try {
201
- const res = await (0, import_axios.default)(axiosRequestConfig);
203
+ const res = await (0, import_utils.serverRequest)(axiosRequestConfig);
202
204
  this.logger.info(`custom-request:send:${filterByTk} success`);
203
205
  ctx.body = res.data;
204
206
  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.0.35",
3
+ "version": "2.0.37",
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": "724e9b28057c9033b9d57bdbeda5a331c9dcc646",
34
+ "gitHead": "816b2b1e151dcdca857c4284ad91adea16f1904d",
35
35
  "keywords": [
36
36
  "Actions"
37
37
  ]