Skip to content

Commit

Permalink
Merge pull request #201 from OpenWebhook/clean-domain-in-store
Browse files Browse the repository at this point in the history
fix: make sure webhookstore url does not have a trailing slash
  • Loading branch information
Samox authored Mar 22, 2023
2 parents 669dc23 + c560ed0 commit 69d4aec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NavBar/StoreConfig/StoreConfigNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const StoreConfigNavItem = () => {

const { value: webhookStoreUrl } = useContext(WebhookStoreUrlContext);
const accessToken = localStorage.getItem(ACCESS_TOKEN_KEY);
const { get, response } = useFetch(webhookStoreUrl, {
const { get, response } = useFetch(new URL(webhookStoreUrl).origin, {
headers: accessToken ? { Authorization: `Bearer ${accessToken}` } : {},
});
const idToken = localStorage.getItem(IDENTITY_TOKEN_KEY);
Expand Down

0 comments on commit 69d4aec

Please sign in to comment.