nitro
nitro copied to clipboard
Returning Web Response in Azure SWA is not working
Environment
Nuxt: 3.12.3 Node: 20
Reproduction
Deploy a basic Nuxt app with an api that returns a web response like
export default function eventHandler((event) => {
return new Response(JSON.stringify({ username: 'test' }), { headers: { 'Content-Type': 'application/json' } })
})
Describe the bug
Instead of the actual json, Im getting an empty object returned when deployed to Azure SWA:
// /api/user
{}
Additional context
No response
Logs
No response