Skip to content

Commit

Permalink
Remove Authorization header adding (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Sep 16, 2024
1 parent 2eff599 commit 0658c34
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions resources/js/gtm.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ document.addEventListener('turbo:load', async (event) => {
let gaUserId = getUserId();
let gaSessionId = getSessionId();

let options = { headers: { Store: window.config.store_code } }
if (window.magentoUser.defaults.headers.common['Authorization']?.length > 7) {
options['headers']['Authorization'] = window.magentoUser.defaults.headers.common['Authorization']
}

if (!localStorage.mask || (!gaUserId && !gaSessionId)) {
return
}
Expand All @@ -145,7 +140,7 @@ document.addEventListener('turbo:load', async (event) => {
gaUserId: gaUserId,
gaSessionId: gaSessionId,
}
window.magentoGraphQL(query, variables, options)
window.magentoGraphQL(query, variables)
});
}
}, {passive: true})

0 comments on commit 0658c34

Please # to comment.