Skip to content

Commit

Permalink
feat(core): ✨ set custom request headers
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfoucrier committed May 5, 2023
1 parent 60fa820 commit 0edbffe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ function request(
'Accept',
'text/html,application/xhtml+xml,application/xml'
);
xhr.setRequestHeader('x-barba', 'yes');

headers.all().forEach((value, key) => {
xhr.setRequestHeader(key, value);
});

xhr.send();
});
}
Expand Down

0 comments on commit 0edbffe

Please sign in to comment.