mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Add max redirects setting to test
This commit is contained in:
parent
9b6cb3fb5d
commit
9d5b896b00
@ -19,6 +19,7 @@ type BaseSettings = {
|
||||
forceVerticalLayout: boolean,
|
||||
autoHideMenuBar: boolean,
|
||||
theme: string,
|
||||
maxRedirects: number,
|
||||
disableAnalyticsTracking: boolean,
|
||||
pluginPath: string
|
||||
};
|
||||
@ -42,6 +43,7 @@ export function init (): BaseSettings {
|
||||
httpProxy: '',
|
||||
httpsProxy: '',
|
||||
noProxy: '',
|
||||
maxRedirects: -1,
|
||||
proxyEnabled: false,
|
||||
timeout: 0,
|
||||
validateSSL: true,
|
||||
|
@ -132,7 +132,7 @@ export function _actuallySend (
|
||||
|
||||
// Set all the basic options
|
||||
setOpt(Curl.option.FOLLOWLOCATION, settings.followRedirects);
|
||||
setOpt(Curl.option.MAXREDIRS, 20);
|
||||
setOpt(Curl.option.MAXREDIRS, settings.maxRedirects);
|
||||
setOpt(Curl.option.TIMEOUT_MS, settings.timeout); // 0 for no timeout
|
||||
setOpt(Curl.option.VERBOSE, true); // True so debug function works
|
||||
setOpt(Curl.option.NOPROGRESS, false); // False so progress function works
|
||||
|
@ -139,6 +139,19 @@ class General extends PureComponent {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="form-control form-control--outlined">
|
||||
<label>Maximum Redirects
|
||||
<HelpTooltip className="space-left">
|
||||
(-1 for unlimited)
|
||||
</HelpTooltip>
|
||||
<input type="number"
|
||||
name="maxRedirects"
|
||||
min={-1}
|
||||
defaultValue={settings.maxRedirects}
|
||||
onChange={this._handleUpdateSetting}/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="form-control form-control--outlined">
|
||||
<label>Network Request Timeout
|
||||
<HelpTooltip className="space-left">
|
||||
|
Loading…
Reference in New Issue
Block a user