From 75d8cb0877f88b33dcf6971df099054f18c3bf59 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 21 May 2024 11:23:27 -0500 Subject: [PATCH] Fall back to external baseurl in API client Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1663 --- src/api/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/index.ts b/src/api/index.ts index dda1fa508..39d6a14d9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -103,7 +103,7 @@ export default (getState: () => RootState, authType: string = 'user'): AxiosInst const state = getState(); const accessToken = getToken(state, authType); const me = state.me; - const baseURL = me ? getAuthBaseURL(state, me) : ''; + const baseURL = me ? getAuthBaseURL(state, me) : localStorage.getItem('soapbox:external:baseurl') ?? ''; const relayUrl = state.getIn(['instance', 'nostr', 'relay']) as string | undefined; const pubkey = state.getIn(['instance', 'nostr', 'pubkey']) as string | undefined;