Skip to content

Commit

Permalink
fix(#2045): send credential cookies (i.e. session cookies) on ajax re…
Browse files Browse the repository at this point in the history
…quests (#2046)
  • Loading branch information
SteKoe committed Jun 10, 2022
1 parent 084c2cc commit 5a0b54f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const redirectOn401 = (predicate = () => true) => error => {

};

const instance = axios.create({headers: {'Accept': 'application/json'}});
const instance = axios.create({withCredentials: true, headers: {'Accept': 'application/json'}});
instance.interceptors.response.use(response => response, redirectOn401());
instance.create = axios.create;

Expand Down

0 comments on commit 5a0b54f

Please sign in to comment.