@nu-art/thunderstorm-backend 0.401.3 → 0.401.5
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/index.d.ts +0 -3
- package/index.js +0 -3
- package/modules/_imports.d.ts +0 -3
- package/modules/_imports.js +0 -3
- package/package.json +7 -8
- package/utils/types.d.ts +0 -2
- package/modules/proxy/ModuleBE_RemoteProxy.d.ts +0 -35
- package/modules/proxy/ModuleBE_RemoteProxy.js +0 -86
- package/modules/proxy/RemoteProxyCaller.d.ts +0 -19
- package/modules/proxy/RemoteProxyCaller.js +0 -82
- package/modules/proxy/assert-secret-middleware.d.ts +0 -2
- package/modules/proxy/assert-secret-middleware.js +0 -24
- package/utils/promisify-request.d.ts +0 -3
- package/utils/promisify-request.js +0 -33
package/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export * from './modules/proxy/RemoteProxyCaller.js';
|
|
2
|
-
export * from './modules/proxy/ModuleBE_RemoteProxy.js';
|
|
3
1
|
export * from './modules/CleanupScheduler.js';
|
|
4
2
|
export * from './modules/ModuleBE_APIs.js';
|
|
5
3
|
export * from './modules/action-processor/ModuleBE_ActionProcessor.js';
|
|
@@ -13,7 +11,6 @@ export * from './modules/http/AxiosHttpModule.js';
|
|
|
13
11
|
export * from './modules/http/types.js';
|
|
14
12
|
export * from './modules/ModuleBE_ForceUpgrade.js';
|
|
15
13
|
export * from './modules/ModuleBE_ServerInfo.js';
|
|
16
|
-
export * from './utils/promisify-request.js';
|
|
17
14
|
export * from './utils/types.js';
|
|
18
15
|
export * from './utils/file.js';
|
|
19
16
|
export * from './core/Storm.js';
|
package/index.js
CHANGED
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
* See the License for the specific language governing permissions and
|
|
19
19
|
* limitations under the License.
|
|
20
20
|
*/
|
|
21
|
-
export * from './modules/proxy/RemoteProxyCaller.js';
|
|
22
|
-
export * from './modules/proxy/ModuleBE_RemoteProxy.js';
|
|
23
21
|
export * from './modules/CleanupScheduler.js';
|
|
24
22
|
export * from './modules/ModuleBE_APIs.js';
|
|
25
23
|
export * from './modules/action-processor/ModuleBE_ActionProcessor.js';
|
|
@@ -33,7 +31,6 @@ export * from './modules/http/AxiosHttpModule.js';
|
|
|
33
31
|
export * from './modules/http/types.js';
|
|
34
32
|
export * from './modules/ModuleBE_ForceUpgrade.js';
|
|
35
33
|
export * from './modules/ModuleBE_ServerInfo.js';
|
|
36
|
-
export * from './utils/promisify-request.js';
|
|
37
34
|
export * from './utils/types.js';
|
|
38
35
|
export * from './utils/file.js';
|
|
39
36
|
export * from './core/Storm.js';
|
package/modules/_imports.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export * from './server/server-api.js';
|
|
2
2
|
export * from './server/HttpServer.js';
|
|
3
|
-
export * from './proxy/RemoteProxyCaller.js';
|
|
4
|
-
export * from './proxy/ModuleBE_RemoteProxy.js';
|
|
5
|
-
export * from '../utils/promisify-request.js';
|
|
6
3
|
export * from './CleanupScheduler.js';
|
package/modules/_imports.js
CHANGED
|
@@ -20,7 +20,4 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export * from './server/server-api.js';
|
|
22
22
|
export * from './server/HttpServer.js';
|
|
23
|
-
export * from './proxy/RemoteProxyCaller.js';
|
|
24
|
-
export * from './proxy/ModuleBE_RemoteProxy.js';
|
|
25
|
-
export * from '../utils/promisify-request.js';
|
|
26
23
|
export * from './CleanupScheduler.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nu-art/thunderstorm-backend",
|
|
3
|
-
"version": "0.401.
|
|
3
|
+
"version": "0.401.5",
|
|
4
4
|
"description": "Thunderstorm Backend",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TacB0sS",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"linkDirectory": true
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@nu-art/testalot": "0.401.
|
|
41
|
-
"@nu-art/thunderstorm-shared": "0.401.
|
|
42
|
-
"@nu-art/firebase-backend": "0.401.
|
|
43
|
-
"@nu-art/firebase-shared": "0.401.
|
|
44
|
-
"@nu-art/google-services-backend": "0.401.
|
|
45
|
-
"@nu-art/ts-common": "0.401.
|
|
40
|
+
"@nu-art/testalot": "0.401.5",
|
|
41
|
+
"@nu-art/thunderstorm-shared": "0.401.5",
|
|
42
|
+
"@nu-art/firebase-backend": "0.401.5",
|
|
43
|
+
"@nu-art/firebase-shared": "0.401.5",
|
|
44
|
+
"@nu-art/google-services-backend": "0.401.5",
|
|
45
|
+
"@nu-art/ts-common": "0.401.5",
|
|
46
46
|
"abort-controller": "^3.0.0",
|
|
47
47
|
"axios": "^1.13.1",
|
|
48
48
|
"body-parser": "^1.19.0",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"react-router-dom": "^6.9.0",
|
|
67
67
|
"react-virtualized-auto-sizer": "^1.0.12",
|
|
68
68
|
"react-window": "^1.8.8",
|
|
69
|
-
"request": "^2.88.0",
|
|
70
69
|
"stream-browserify": "^3.0.0",
|
|
71
70
|
"util": "^0.12.4"
|
|
72
71
|
},
|
package/utils/types.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as express from 'express';
|
|
2
|
-
import { CoreOptions, UriOptions } from 'request';
|
|
3
2
|
import { ApiException } from '@nu-art/ts-common';
|
|
4
3
|
export type Express = express.Express;
|
|
5
4
|
export type ExpressRouter = express.Router;
|
|
6
5
|
export type ExpressRequest = express.Request<any>;
|
|
7
6
|
export type ExpressResponse = express.Response;
|
|
8
7
|
export type ExpressRequestHandler = express.RequestHandler;
|
|
9
|
-
export type RequestOptions = CoreOptions & UriOptions;
|
|
10
8
|
export type ServerApi_Middleware = () => Promise<any>;
|
|
11
9
|
export type HttpErrorHandler = (error: ApiException) => Promise<string>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Module, TS_Object } from '@nu-art/ts-common';
|
|
2
|
-
import { ServerApi } from '../server/server-api.js';
|
|
3
|
-
import { ServerApi_Middleware } from '../../utils/types.js';
|
|
4
|
-
import { TypedApi } from '@nu-art/thunderstorm-shared';
|
|
5
|
-
type ProxyConfig = {
|
|
6
|
-
extras?: TS_Object;
|
|
7
|
-
urls: string[];
|
|
8
|
-
secret: string;
|
|
9
|
-
};
|
|
10
|
-
export type RemoteProxyConfig = {
|
|
11
|
-
remotes: {
|
|
12
|
-
[proxyId: string]: ProxyConfig;
|
|
13
|
-
};
|
|
14
|
-
secretHeaderName?: string;
|
|
15
|
-
proxyHeaderName?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare class ModuleBE_RemoteProxy_Class<Config extends RemoteProxyConfig> extends Module<Config> {
|
|
18
|
-
readonly Middleware: ServerApi_Middleware;
|
|
19
|
-
private secretHeader;
|
|
20
|
-
private proxyHeader;
|
|
21
|
-
protected init(): void;
|
|
22
|
-
assertSecret(): TS_Object | undefined;
|
|
23
|
-
}
|
|
24
|
-
export declare class ServerApi_Proxy<API extends TypedApi<any, any, any, any>> extends ServerApi<API> {
|
|
25
|
-
private readonly api;
|
|
26
|
-
constructor(api: ServerApi<API>);
|
|
27
|
-
protected process(): Promise<API['R']>;
|
|
28
|
-
}
|
|
29
|
-
export declare class ServerApi_Alternate<API extends TypedApi<any, any, any, any>> extends ServerApi<API> {
|
|
30
|
-
private readonly api;
|
|
31
|
-
constructor(api: ServerApi<API>, pathSuffix: string);
|
|
32
|
-
protected process(): Promise<API['R']>;
|
|
33
|
-
}
|
|
34
|
-
export declare const ModuleBE_RemoteProxy: ModuleBE_RemoteProxy_Class<RemoteProxyConfig>;
|
|
35
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Thunderstorm is a full web app framework!
|
|
3
|
-
*
|
|
4
|
-
* Typescript & Express backend infrastructure that natively runs on firebase function
|
|
5
|
-
* Typescript & React frontend infrastructure
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
import { ApiException, ImplementationMissingException, Module } from '@nu-art/ts-common';
|
|
22
|
-
import { ServerApi } from '../server/server-api.js';
|
|
23
|
-
import { HeaderKey } from '../server/HeaderKey.js';
|
|
24
|
-
import { MemKey_HttpRequestPath } from '../server/consts.js';
|
|
25
|
-
export class ModuleBE_RemoteProxy_Class extends Module {
|
|
26
|
-
Middleware = async () => {
|
|
27
|
-
ModuleBE_RemoteProxy.assertSecret();
|
|
28
|
-
};
|
|
29
|
-
secretHeader;
|
|
30
|
-
proxyHeader;
|
|
31
|
-
init() {
|
|
32
|
-
if (!this.config)
|
|
33
|
-
throw new ImplementationMissingException('MUST specify config for this module!!');
|
|
34
|
-
if (!this.config.secretHeaderName)
|
|
35
|
-
this.config.secretHeaderName = 'x-secret';
|
|
36
|
-
if (!this.config.proxyHeaderName)
|
|
37
|
-
this.config.proxyHeaderName = 'x-proxy';
|
|
38
|
-
this.secretHeader = new HeaderKey(this.config.secretHeaderName);
|
|
39
|
-
this.proxyHeader = new HeaderKey(this.config.proxyHeaderName);
|
|
40
|
-
}
|
|
41
|
-
assertSecret() {
|
|
42
|
-
if (!this.secretHeader || !this.proxyHeader)
|
|
43
|
-
throw new ImplementationMissingException('MUST add RemoteProxy to your module list!!!');
|
|
44
|
-
const secret = this.secretHeader.get();
|
|
45
|
-
const proxyId = this.proxyHeader.get();
|
|
46
|
-
const expectedSecret = this.config.remotes[proxyId];
|
|
47
|
-
if (!proxyId)
|
|
48
|
-
throw new ApiException(403, `Missing proxy declaration in config for ${proxyId} !!`);
|
|
49
|
-
if (!secret)
|
|
50
|
-
throw new ApiException(403, `Missing secret !!`);
|
|
51
|
-
if (!expectedSecret)
|
|
52
|
-
throw new ApiException(403, `ProxyId '${proxyId}' is not registered for remote access !!`);
|
|
53
|
-
if (expectedSecret.secret !== secret)
|
|
54
|
-
throw new ApiException(403, `Secret does not match for proxyId: ${proxyId}`);
|
|
55
|
-
const requestUrl = MemKey_HttpRequestPath.get();
|
|
56
|
-
if (!expectedSecret.urls?.find(urlPattern => requestUrl.match(urlPattern)))
|
|
57
|
-
throw new ApiException(403, `Requested url '${requestUrl}' is not allowed from proxyId: ${proxyId}`);
|
|
58
|
-
return expectedSecret.extras;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
export class ServerApi_Proxy extends ServerApi {
|
|
62
|
-
api;
|
|
63
|
-
constructor(api) {
|
|
64
|
-
// super(api.method, `${api.relativePath}/proxy`);
|
|
65
|
-
super({ ...api.apiDef, path: `${api.apiDef.path}/proxy` });
|
|
66
|
-
this.api = api;
|
|
67
|
-
this.setMiddlewares(ModuleBE_RemoteProxy.Middleware);
|
|
68
|
-
}
|
|
69
|
-
async process() {
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
return this.api.process();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export class ServerApi_Alternate extends ServerApi {
|
|
75
|
-
api;
|
|
76
|
-
constructor(api, pathSuffix) {
|
|
77
|
-
// super(api.method, `${api.relativePath}/proxy`);
|
|
78
|
-
super({ ...api.apiDef, path: `${api.apiDef.path}/${pathSuffix}` });
|
|
79
|
-
this.api = api;
|
|
80
|
-
}
|
|
81
|
-
async process() {
|
|
82
|
-
// @ts-ignore
|
|
83
|
-
return this.api.process();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export const ModuleBE_RemoteProxy = new ModuleBE_RemoteProxy_Class();
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Module } from '@nu-art/ts-common';
|
|
2
|
-
import { BodyApi, QueryApi } from '@nu-art/thunderstorm-shared';
|
|
3
|
-
export type RemoteServerConfig = {
|
|
4
|
-
secretHeaderName: string;
|
|
5
|
-
proxyHeaderName: string;
|
|
6
|
-
proxyId: string;
|
|
7
|
-
secret: string;
|
|
8
|
-
url: string;
|
|
9
|
-
};
|
|
10
|
-
export declare class RemoteProxyCaller<Config extends RemoteServerConfig> extends Module<Config> {
|
|
11
|
-
protected init(): void;
|
|
12
|
-
protected executeGetRequest: <API extends QueryApi<any, any, any>>(url: string, _params: API["P"], _headers?: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
}) => Promise<API["R"]>;
|
|
15
|
-
protected executePostRequest: <API extends BodyApi<any, any, any>>(url: string, body: API["B"], _headers?: {
|
|
16
|
-
[key: string]: string;
|
|
17
|
-
}) => Promise<API["R"]>;
|
|
18
|
-
private executeRequest;
|
|
19
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Thunderstorm is a full web app framework!
|
|
3
|
-
*
|
|
4
|
-
* Typescript & Express backend infrastructure that natively runs on firebase function
|
|
5
|
-
* Typescript & React frontend infrastructure
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
import { __stringify, ApiException, composeUrl, ImplementationMissingException, MimeType_json, Module, } from '@nu-art/ts-common';
|
|
22
|
-
import { promisifyRequest } from '../../utils/promisify-request.js';
|
|
23
|
-
import { HeaderKey_ContentType } from '../../shared.js';
|
|
24
|
-
export class RemoteProxyCaller extends Module {
|
|
25
|
-
init() {
|
|
26
|
-
if (!this.config)
|
|
27
|
-
throw new ImplementationMissingException('MUST specify config for this module!!');
|
|
28
|
-
if (!this.config.proxyId)
|
|
29
|
-
throw new ImplementationMissingException('MUST specify the proxyId for the proxy caller!!');
|
|
30
|
-
if (!this.config.url)
|
|
31
|
-
throw new ImplementationMissingException('MUST specify the url for the remote server!!');
|
|
32
|
-
if (!this.config.secret)
|
|
33
|
-
throw new ImplementationMissingException('MUST specify the secret for the remote server!!');
|
|
34
|
-
if (!this.config.secretHeaderName)
|
|
35
|
-
this.config.secretHeaderName = 'x-secret';
|
|
36
|
-
if (!this.config.proxyHeaderName)
|
|
37
|
-
this.config.proxyHeaderName = 'x-proxy';
|
|
38
|
-
}
|
|
39
|
-
executeGetRequest = async (url, _params, _headers) => {
|
|
40
|
-
const proxyRequest = {
|
|
41
|
-
headers: {
|
|
42
|
-
..._headers,
|
|
43
|
-
[this.config.secretHeaderName]: this.config.secret,
|
|
44
|
-
[this.config.proxyHeaderName]: this.config.proxyId,
|
|
45
|
-
},
|
|
46
|
-
uri: `${composeUrl(`${this.config.url}${url}`, _params)}`,
|
|
47
|
-
method: 'GET',
|
|
48
|
-
json: true
|
|
49
|
-
};
|
|
50
|
-
return await this.executeRequest(proxyRequest);
|
|
51
|
-
};
|
|
52
|
-
executePostRequest = async (url, body, _headers) => {
|
|
53
|
-
const proxyRequest = {
|
|
54
|
-
headers: {
|
|
55
|
-
..._headers,
|
|
56
|
-
[HeaderKey_ContentType]: MimeType_json,
|
|
57
|
-
[this.config.secretHeaderName]: this.config.secret,
|
|
58
|
-
[this.config.proxyHeaderName]: this.config.proxyId,
|
|
59
|
-
},
|
|
60
|
-
json: true,
|
|
61
|
-
uri: `${composeUrl(`${this.config.url}${url}`)}`,
|
|
62
|
-
body: body,
|
|
63
|
-
method: 'POST'
|
|
64
|
-
};
|
|
65
|
-
return this.executeRequest(proxyRequest);
|
|
66
|
-
};
|
|
67
|
-
executeRequest = async (proxyRequest) => {
|
|
68
|
-
const response = await promisifyRequest(proxyRequest, false);
|
|
69
|
-
if (proxyRequest.headers)
|
|
70
|
-
delete proxyRequest.headers[this.config.secretHeaderName];
|
|
71
|
-
if (response.statusCode !== 200) {
|
|
72
|
-
const errorResponse = response.body;
|
|
73
|
-
if (!errorResponse)
|
|
74
|
-
throw new ApiException(500, `Extraneous error ${__stringify(response)}, Proxy Request: ${__stringify(proxyRequest, true)}`);
|
|
75
|
-
const e = new ApiException(response.statusCode, `Redirect proxy error: ${errorResponse.debugMessage} \n Proxy Request: ${__stringify(proxyRequest, true)}`);
|
|
76
|
-
if (errorResponse.error)
|
|
77
|
-
e.setErrorBody(errorResponse.error);
|
|
78
|
-
throw e;
|
|
79
|
-
}
|
|
80
|
-
return response.toJSON().body;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Thunderstorm is a full web app framework!
|
|
3
|
-
*
|
|
4
|
-
* Typescript & Express backend infrastructure that natively runs on firebase function
|
|
5
|
-
* Typescript & React frontend infrastructure
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
import { ModuleBE_RemoteProxy } from './ModuleBE_RemoteProxy.js';
|
|
22
|
-
export const AssertSecretMiddleware = async () => {
|
|
23
|
-
ModuleBE_RemoteProxy.assertSecret();
|
|
24
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Thunderstorm is a full web app framework!
|
|
3
|
-
*
|
|
4
|
-
* Typescript & Express backend infrastructure that natively runs on firebase function
|
|
5
|
-
* Typescript & React frontend infrastructure
|
|
6
|
-
*
|
|
7
|
-
* Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
import request from 'request';
|
|
22
|
-
import { __stringify, ApiException } from '@nu-art/ts-common';
|
|
23
|
-
export async function promisifyRequest(_request, throwException = true) {
|
|
24
|
-
return new Promise((resolve, rejected) => {
|
|
25
|
-
request(_request, (error, response) => {
|
|
26
|
-
if (error)
|
|
27
|
-
return rejected(new ApiException(503, `Error: ${error}\n Request: ${__stringify(_request, true)}`));
|
|
28
|
-
if (throwException && response.statusCode !== 200)
|
|
29
|
-
return rejected(new ApiException(response.statusCode, `Redirect proxy message, ${__stringify(response.body)} \n${__stringify(request, true)}`));
|
|
30
|
-
resolve(response);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|