Skip to content

Commit 4668d24

Browse files
committed
fix app.js
1 parent 85430f9 commit 4668d24

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/app.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,18 @@ export function createApp(req) {
2222
}
2323

2424
if (__SERVER__ && req) {
25-
const token = req.header('authorization') || (req.cookies && req.cookies['feathers-jwt']);
2625
const app = configureApp(
2726
rest(host('/api')).axios(
2827
axios.create({
2928
headers: {
3029
Cookie: req.get('cookie'),
31-
Authorization: token
30+
Authorization: req.header('authorization')
3231
}
3332
})
3433
)
3534
);
3635

37-
app.set('accessToken', token);
36+
app.set('accessToken', req.cookies && req.cookies['feathers-jwt']);
3837

3938
return app;
4039
}

0 commit comments

Comments
 (0)