UNPKG
@allthings/js-sdk
Version:
latest (11.0.2)
11.0.2
11.0.1
JavaScript SDK for communication with the Allthings API
www.allthings.me
qipp/allthings-js-sdk
@allthings/js-sdk
/
interceptor
/
withCredentials.js
11 lines
(8 loc)
•
229 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
interceptor
from
'rest/interceptor'
import
{ isAuthPath }
from
'./pathPrefix'
export
default
interceptor
({
request
(request) {
if
(
isAuthPath
(request.
path
)) request.
withCredentials
=
true
return
request } })