Skip to content

Commit

Permalink
Merge pull request #1736 from sushi-labs/fix/drpc-header
Browse files Browse the repository at this point in the history
fix: include drpc Authorization header in onFetchRequest
  • Loading branch information
matthewlilley authored Oct 28, 2024
2 parents 52236e5 + 1d89fe4 commit 9d4abf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/web/src/lib/wagmi/config/production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const createProductionConfig = () => {
fetchOptions,
onFetchRequest(_req) {
if (typeof window !== 'undefined' && transportUrl.includes('drpc')) {
drpcJwt && _req.headers.set('Authorization', drpcJwt)
try {
_req.json().then((json) => {
gtagEvent('drpc-request', {
Expand Down

0 comments on commit 9d4abf1

Please sign in to comment.