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
timoclsn
changed the title
Progressively enhanced forms not working on sub-paths (405: not allowed) when deployed on vercel
Progressively enhanced forms not working (405: not allowed) when deployed on vercel
Nov 25, 2023
I'm chiming in because I'm encountering the same problem and I'm keen to stay updated on this discussion. It's imperative that we resolve this swiftly. It's not just about catering to users without JavaScript enabled; it's also about ensuring the integrity of our code. There's a chance there's an issue with my code, and I want to address it promptly to avoid potential future complications.
…ployed (#63978)
Trying to submit a server action when JS is disabled (ie, no action
header in the request, and in the "progressively enhanced" case) for a
static resource results in a 405 error when deployed to Vercel. In the
absence of an action ID header, the request content-type is used to
signal that it shouldn't try and hit the static cache. However with
multipart/form-data, this will include the boundary. This updates the
matcher to consider a boundary string.
Fixes#58814
Closes NEXT-2980
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com/timoclsn/next-forms-app
To Reproduce
Current vs. Expected behavior
Submitting the p.e. form with JavaScript disabled doesn't work (405: not allowed).
This should work when deployed on Vercel.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 Binaries: Node: 18.18.2 npm: 9.8.1 Yarn: 1.22.17 pnpm: 8.9.2 Relevant Packages: next: 14.0.4-canary.11 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.3.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
App Router
Additional context
This happens when deployed on Vercel. It works locally (in dev and production mode).
The text was updated successfully, but these errors were encountered: