After deploying my Nuxt 3 application to production, it seems that the server can’t handle query parameters in the url. If the url has a query param, the server tries to redirect many times, resulting in a ERR_TOO_MANY_REDIRECTS
error in the browser. This happens on all urls with query params on production, but does not happen on my local environment!
I tried looking in to the “_redirects” file (which is empty in my codebase). I can see that this file gets modified during deploy by “Nitro” and adds the following line of code:
/* /.netlify/functions/server 200
I suspect that this line of code in the “_redirects” file causes the problem. When visiting the url in the file, it says:
404
Page not found:
/.netlify/functions/server
I tried adding this server file, but that didn’t fix it.
Could someone help me with this? Thanks in advance.