Bitte nochmal machen
This commit is contained in:
3
.env.example
Normal file
3
.env.example
Normal file
@@ -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) {
|
||||
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 fallback
|
||||
|
||||
@@ -15,6 +15,10 @@ function resolveImageUrl(value) {
|
||||
if (apiBaseUrl) {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user