Skip to content

Commit

Permalink
fix(executor): prevent following redirect
Browse files Browse the repository at this point in the history
closes #92
  • Loading branch information
derevnjuk committed Sep 11, 2020
1 parent e9ab6e0 commit 767c032
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/Commands/RunRepeater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export class RunRepeater implements CommandModule {
const requestExecutor = new DefaultRequestExecutor({
headers,
timeout: 10000,
maxRedirects: 20,
proxyUrl: args.proxy as string
});
const handlerRegistry = new DefaultHandlerRegistry(requestExecutor);
Expand Down
3 changes: 1 addition & 2 deletions src/RequestExecutor/DefaultRequestExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export class DefaultRequestExecutor implements RequestExecutor {

constructor(
private readonly options: {
maxRedirects?: number;
timeout?: number;
proxyUrl?: string;
headers?: Record<string, string | string[]>;
Expand All @@ -38,7 +37,7 @@ export class DefaultRequestExecutor implements RequestExecutor {
headers: { ...script.headers, ...this.options.headers },
timeout: this.options.timeout,
resolveWithFullResponse: true,
maxRedirects: this.options.maxRedirects
followRedirect: false
});

return new ScriptResult({
Expand Down

0 comments on commit 767c032

Please sign in to comment.