Skip to content

Commit 2849138

Browse files
committed
fix: restore authorization context
1 parent b27ae6d commit 2849138

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ const browserUri = '<%= options.browserUri %>';
3131

3232
const createAuthLink = store => setContext((_, { headers }) => {
3333
const token = store.getters['auth/token'];
34+
const context = store.getters['auth/context'];
3435

3536
return {
3637
headers: {
3738
...headers,
38-
authorization: token ? 'Bearer ' + token : '',
39+
...(context && { 'X-Authorization-Context': context }),
40+
Authorization: token ? 'Bearer ' + token : '',
3941
},
4042
};
4143
});

0 commit comments

Comments
 (0)