Skip to content

Commit 00300a8

Browse files
committed
Allow redirect value to be configurable
1 parent 38cc927 commit 00300a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/fetch_request.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class FetchRequest {
4444
body: this.formattedBody,
4545
signal: this.signal,
4646
credentials: 'same-origin',
47-
redirect: 'follow'
47+
redirect: this.redirect
4848
}
4949
}
5050

@@ -101,6 +101,10 @@ export class FetchRequest {
101101
return this.options.signal
102102
}
103103

104+
get redirect () {
105+
return this.options.redirect || 'follow'
106+
}
107+
104108
get additionalHeaders () {
105109
return this.options.headers || {}
106110
}

0 commit comments

Comments
 (0)