Skip to content

Commit fb4fcb5

Browse files
authored
Merge pull request #25 from t27duck/configure_redirect
Allow redirect value to be configurable
2 parents 38cc927 + 00300a8 commit fb4fcb5

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)