Bitte nochmal machen
This commit is contained in:
parent
e939543f3b
commit
f91bfbdd65
|
|
@ -0,0 +1,3 @@
|
||||||
|
# API Base URL for production
|
||||||
|
# Set this to your production domain when building
|
||||||
|
VITE_API_BASE_URL=https://annavillesda.org
|
||||||
|
|
@ -33,6 +33,10 @@ function resolveImageUrl(value, fallback) {
|
||||||
if (apiBaseUrl) {
|
if (apiBaseUrl) {
|
||||||
return `${apiBaseUrl}${path}`
|
return `${apiBaseUrl}${path}`
|
||||||
}
|
}
|
||||||
|
// Fallback to current domain if no API base URL is set
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
return `${window.location.origin}${path}`
|
||||||
|
}
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
return fallback
|
return fallback
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@ function resolveImageUrl(value) {
|
||||||
if (apiBaseUrl) {
|
if (apiBaseUrl) {
|
||||||
return `${apiBaseUrl}${path}`
|
return `${apiBaseUrl}${path}`
|
||||||
}
|
}
|
||||||
|
// Fallback to current domain if no API base URL is set
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
return `${window.location.origin}${path}`
|
||||||
|
}
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue