2017-07-12 14:47:09 +00:00
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|
export const headersInterceptor = (request, next) => {
|
2018-10-17 07:13:26 +00:00
|
|
|
next(response => {
|
2017-07-12 14:47:09 +00:00
|
|
|
const headers = {};
|
|
|
|
response.headers.forEach((value, key) => {
|
|
|
|
headers[key] = value;
|
|
|
|
});
|
2018-08-27 14:21:02 +00:00
|
|
|
// eslint-disable-next-line no-param-reassign
|
2017-07-12 14:47:09 +00:00
|
|
|
response.headers = headers;
|
|
|
|
});
|
|
|
|
};
|