@analogjs/vite-plugin-nitro 0.2.0-beta.23 → 0.2.0-beta.24
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.
package/package.json
CHANGED
|
@@ -13,7 +13,12 @@ export default eventHandler(async (event) => {
|
|
|
13
13
|
if (event.node.req.url?.startsWith(apiPrefix)) {
|
|
14
14
|
const reqUrl = event.node.req.url?.replace(apiPrefix, '');
|
|
15
15
|
|
|
16
|
-
if (
|
|
16
|
+
if (
|
|
17
|
+
event.node.req.method === 'GET' &&
|
|
18
|
+
// in the case of XML routes, we want to proxy the request so that nitro gets the correct headers
|
|
19
|
+
// and can render the XML correctly as a static asset
|
|
20
|
+
!event.node.req.url?.endsWith('.xml')
|
|
21
|
+
) {
|
|
17
22
|
return $fetch(reqUrl);
|
|
18
23
|
}
|
|
19
24
|
|