N
Nuxtβ€’8mo ago
leemartin

*Some* calls to Server API being appended with ".html"

I've mapped out a Server API (integrating with Contentful) based on the Nuxt3 server directory docs. It all seems to be functioning well, most of the time. However, occasionally, I've noticed that ".html" gets appended to the API call, ending in some bad calls or worst misrouting. Have you ever heard of this? So, if I have a route /messages/[id].get.ts sometimes it is called as /messages/123.html.get.ts. I've seen this happen occasionally when calling the API route directly and when calling it via useFetch but there doesn't seem to be a method to this madness. I should mention my site is set to ssr: false if that makes any difference.
2 Replies
leemartin
leemartinOPβ€’8mo ago
Note: this may only happen locally.
manniL
manniLβ€’8mo ago
never seen this πŸ‘€ Any chance you have a service worker running or old redirects for localhost? or maybe trailing slash vs. non trailing slash by any chance? πŸ€”
Want results from more Discord servers?
Add your server