Skip to content

Commit b597dfc

Browse files
authored
fix(dashboard): Fix api 'auto' options (#3807)
1 parent 7998c95 commit b597dfc

File tree

1 file changed

+2
-2
lines changed
  • packages/dashboard/src/lib/graphql

1 file changed

+2
-2
lines changed

packages/dashboard/src/lib/graphql/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { DocumentNode, print } from 'graphql';
44
import { uiConfig } from 'virtual:vendure-ui-config';
55

66
const API_URL =
7-
uiConfig.api.host +
8-
(uiConfig.api.port !== 'auto' ? `:${uiConfig.api.port}` : '') +
7+
(uiConfig.api.host !== "auto" ? uiConfig.api.host : `${window.location.protocol}//${window.location.hostname}`) +
8+
`:${(uiConfig.api.port !== 'auto' ? uiConfig.api.port : window.location.port)}` +
99
`/${uiConfig.api.adminApiPath}`;
1010

1111
export const SELECTED_CHANNEL_TOKEN_KEY = 'vendure-selected-channel-token';

0 commit comments

Comments
 (0)