We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7998c95 commit b597dfcCopy full SHA for b597dfc
packages/dashboard/src/lib/graphql/api.ts
@@ -4,8 +4,8 @@ import { DocumentNode, print } from 'graphql';
4
import { uiConfig } from 'virtual:vendure-ui-config';
5
6
const API_URL =
7
- uiConfig.api.host +
8
- (uiConfig.api.port !== 'auto' ? `:${uiConfig.api.port}` : '') +
+ (uiConfig.api.host !== "auto" ? uiConfig.api.host : `${window.location.protocol}//${window.location.hostname}`) +
+ `:${(uiConfig.api.port !== 'auto' ? uiConfig.api.port : window.location.port)}` +
9
`/${uiConfig.api.adminApiPath}`;
10
11
export const SELECTED_CHANNEL_TOKEN_KEY = 'vendure-selected-channel-token';
0 commit comments