mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2025-10-29 13:10:12 +00:00
apiUrl builds url to planetposen-backend which prefixes localhost if dev
This commit is contained in:
@@ -5,8 +5,9 @@ const LOCALHOST_API = 'http://localhost:30010';
|
||||
export function buildApiUrl(path: string) {
|
||||
let localhostApi = false;
|
||||
|
||||
if (dev) localhostApi = true;
|
||||
if (browser && window?.location?.href.includes('localhost')) {
|
||||
if (dev) {
|
||||
localhostApi = true;
|
||||
} else if (browser && window?.location?.href.includes('localhost')) {
|
||||
localhostApi = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user