Skip to content
Snippets Groups Projects
Commit cdf70b1c authored by Rodrigo Nascimento's avatar Rodrigo Nascimento Committed by Diego Sampaio
Browse files

[FIX] Limit App’s HTTP calls to 500ms (#13949)

parent 19c6eb74
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ export class RealAppBridges extends AppBridges {
this._apiBridge = new AppApisBridge(orch);
this._detBridge = new AppDetailChangesBridge(orch);
this._envBridge = new AppEnvironmentalVariableBridge(orch);
this._httpBridge = new AppHttpBridge();
this._httpBridge = new AppHttpBridge(orch);
this._lisnBridge = new AppListenerBridge(orch);
this._msgBridge = new AppMessageBridge(orch);
this._persistBridge = new AppPersistenceBridge(orch);
......
import { HTTP } from 'meteor/http';
export class AppHttpBridge {
constructor(orch) {
this.orch = orch;
}
async call(info) {
if (typeof info.request.timeout !== 'number' || info.request.timeout > 500) {
info.request.timeout = 500;
}
if (!info.request.content && typeof info.request.data === 'object') {
info.request.content = JSON.stringify(info.request.data);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment