You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Not possible without AWS setup using API Gateway)
Steps to reproduce
Setup Nuxt app running behind AWS API Gateway
Create dynamic route
Click link to dynamic route
What is expected ?
Router navigates to page defined in dynamic route
What is actually happening?
400 error when trying to fetch /_nuxt/pages/resource/[_]id.js
Additional comments?
AWS API Gateway does not allow square brackets "[" and "]" in URLs. Nuxt uses these square brackets in the file names for the compiled JS for dynamic routes. Any time that a request is made to load this file, API Gateway returns a 400 error. The recommended fix for this is encoding the URL before making the request, which is what Next.js did to fix this same issue (vercel/next.js#8013). Another possible fix could be adding a configuration option for changing the name of the generated files for dynamic routes, and giving users the ability to replace the square brackets with something else.
This bug report is available on Nuxt community (#c10860)
The text was updated successfully, but these errors were encountered:
Version
v2.13.2
Reproduction link
(Not possible without AWS setup using API Gateway)
Steps to reproduce
What is expected ?
Router navigates to page defined in dynamic route
What is actually happening?
400 error when trying to fetch
/_nuxt/pages/resource/[_]id.js
Additional comments?
AWS API Gateway does not allow square brackets "[" and "]" in URLs. Nuxt uses these square brackets in the file names for the compiled JS for dynamic routes. Any time that a request is made to load this file, API Gateway returns a 400 error. The recommended fix for this is encoding the URL before making the request, which is what Next.js did to fix this same issue (vercel/next.js#8013). Another possible fix could be adding a configuration option for changing the name of the generated files for dynamic routes, and giving users the ability to replace the square brackets with something else.
The text was updated successfully, but these errors were encountered: