I created a serverMiddleware in my Nuxt app that makes this call for example, /api/fetch?url=<user_submitted_url>. While it works on Heroku, my app gives me 404 error whenever it tries to make that call.
I've tried added fallback: true to generate in the config with no luck.
Yea. Apparently, these issues aren't related. The serverMiddleware doesn't work on static hosting hence it doesn't work on Netlify. I replaced the serverMiddleware with Netlify functions.
Does it work with ServerMiddleware?
I created a serverMiddleware in my Nuxt app that makes this call for example,
/api/fetch?url=<user_submitted_url>
. While it works on Heroku, my app gives me 404 error whenever it tries to make that call.I've tried added
fallback: true
togenerate
in the config with no luck.Do you encounter this before?
Hey, not come across that no. Did you manage to fix t?
Yea. Apparently, these issues aren't related. The serverMiddleware doesn't work on static hosting hence it doesn't work on Netlify. I replaced the serverMiddleware with Netlify functions.
Nice 👏