OhMyDitzzy
commited on
Commit
·
aeb67ac
1
Parent(s):
5468e5f
fix: domain
Browse files- src/lib/api-url.ts +3 -3
src/lib/api-url.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
export function getBaseUrl(): string {
|
| 2 |
// Check if we're in browser
|
| 3 |
if (typeof window !== 'undefined') {
|
| 4 |
-
if (window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
|
| 5 |
return process.env.DOMAIN_URL;
|
| 6 |
-
}
|
| 7 |
return `${window.location.protocol}//${window.location.host}`;
|
| 8 |
}
|
| 9 |
|
| 10 |
return process.env.NODE_ENV === 'production'
|
| 11 |
-
?
|
| 12 |
: 'http://localhost:5000';
|
| 13 |
}
|
| 14 |
|
|
|
|
| 1 |
export function getBaseUrl(): string {
|
| 2 |
// Check if we're in browser
|
| 3 |
if (typeof window !== 'undefined') {
|
| 4 |
+
/*if (window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
|
| 5 |
return process.env.DOMAIN_URL;
|
| 6 |
+
}*/
|
| 7 |
return `${window.location.protocol}//${window.location.host}`;
|
| 8 |
}
|
| 9 |
|
| 10 |
return process.env.NODE_ENV === 'production'
|
| 11 |
+
? `${window.location.protocol}//${window.location.host}`
|
| 12 |
: 'http://localhost:5000';
|
| 13 |
}
|
| 14 |
|