@frontstackdev/cli 0.0.0-canary-20251106220349 → 0.0.0-canary-20251107125241
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,15 +182,6 @@ 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
|
-
}
|
|
194
185
|
}
|
|
195
186
|
|
|
196
187
|
return await ofetch.raw(path, options)
|
|
@@ -26,6 +26,7 @@ type RequestOptions = {
|
|
|
26
26
|
* Optionally, provide a proxy URL path that will be concatenated with the original API path.
|
|
27
27
|
* For example, if proxyUrl is '/api' and the original request is to '/block',
|
|
28
28
|
* the request will be sent to '/api/block'.
|
|
29
|
+
* You can provide absolute as well as relative URLs.
|
|
29
30
|
* The original target URL is passed in the 'fs-target-url' header for the proxy to forward to.
|
|
30
31
|
* This is useful to prevent CORS issues when making requests from a browser.
|
|
31
32
|
*/
|
package/dist/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.0-canary-
|
|
1
|
+
0.0.0-canary-20251107125241
|