@frontstackdev/cli 0.0.0-canary-20251031085239 → 0.0.0-canary-20251106165749
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -182,6 +182,15 @@ const invoke = async (path: string, method: Method, payload: any, headers: any,
|
|
|
182
182
|
// Remove trailing slash from proxyUrl and leading slash is already in originalPath
|
|
183
183
|
const normalizedProxyUrl = proxyUrl.endsWith('/') ? proxyUrl.slice(0, -1) : proxyUrl
|
|
184
184
|
path = normalizedProxyUrl + originalPath
|
|
185
|
+
|
|
186
|
+
// When using a proxy with a relative path, we need to provide a baseURL
|
|
187
|
+
// Detect if we're in browser or server context
|
|
188
|
+
if (typeof window !== 'undefined') {
|
|
189
|
+
options.baseURL = window.location.origin
|
|
190
|
+
} else {
|
|
191
|
+
// In server context, use the request URL if available, otherwise use localhost
|
|
192
|
+
options.baseURL = 'http://localhost:3000'
|
|
193
|
+
}
|
|
185
194
|
}
|
|
186
195
|
|
|
187
196
|
return await ofetch.raw(path, options)
|
package/dist/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.0-canary-
|
|
1
|
+
0.0.0-canary-20251106165749
|