Next.js Discord

Discord Forum

Is there a way to disable the Origin check?

Unanswered
Hawfinch posted this in #help-forum
Open in Discord
HawfinchOP
Hello. I can't run Next.js on my local machine for one reason or another, so I am developing using VPS and VSCode Tunnel.
I have set up a server using next dev and when the server action is executed I get the following error
`x-forwarded-host` and `host` headers do not match `origin` header 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)

I think this error to the fact that VSCode Tunnel does port forwarding with URLs like https://xxxxxxxx-3000.xxx.devtunnels.ms/.
So, is there any way to disable this check? Of course, I am open to dealing with this in a non-deactivation way.

P.S. This VPS does not allow port opening, so it is difficult to access the IP directly

I am using a translator so sorry if there are bad translations

10 Replies

HawfinchOP
same issue in codespace
Operating System:
  Platform: linux
  Arch: x64
  Version: #15~22.04.1-Ubuntu SMP Fri Oct  6 13:20:44 UTC 2023
Binaries:
  Node: 20.8.1
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 8.9.2
Relevant Packages:
  next: 13.5.6
  eslint-config-next: 13.4.19
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A


warn  - Latest canary version not detected, detected: "13.5.6", newest: "14.0.2-canary.10".
        Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
        Read more - https://nextjs.org/docs/messages/opening-an-issue

info is here
@Hawfinch yes
yes can confirm i can reproduce it too, this is weird
you might want to submit a bug report
HawfinchOP
ok i'll create issue tomorrow
Hi there, I am experiencing the same issue. Is there any more information on it?
edit: found the issue you were talking about (https://github.com/vercel/next.js/issues/58019 this one right)