Link to the code that reproduces this issue
https://github.com/waki285/Server-Actions-Bug
To Reproduce
- Clone the repository in GitHub Codespaces or VSCode Tunnel.
- Start the server with
next dev.
- Codespaces (or VSCode Tunnel) will automatically perform port forwarding and you can access the launched website through it.
- Click the "Execute Server Actions" button.
- An error will occur.
Current vs. Expected behavior
Expected:
Server Actions are executed successfully and no errors occur.
Current:
The following error occurs
`false` header with value `********-3000.***.devtunnels.ms` does not match `origin` header with value `localhost:3000` from a forwarded Server Actions request. Aborting the action.
⨯ Error: Invalid Server Actions request.
at AsyncLocalStorage.run (node:async_hooks:346:14)
at AsyncLocalStorage.run (node:async_hooks:346:14)
Verify canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022
Binaries:
Node: 20.9.0
npm: 10.2.2
Yarn: N/A
pnpm: 8.10.2
Relevant Packages:
next: 14.0.2-canary.11
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
App Router
Additional context
No response
Link to the code that reproduces this issue
https://github.com/waki285/Server-Actions-Bug
To Reproduce
next dev.Current vs. Expected behavior
Expected:
Server Actions are executed successfully and no errors occur.
Current:
The following error occurs
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 Binaries: Node: 20.9.0 npm: 10.2.2 Yarn: N/A pnpm: 8.10.2 Relevant Packages: next: 14.0.2-canary.11 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
App Router
Additional context
No response