Next.js Discord

Discord Forum

Allow mismatched origin x-forwarded-host in server action

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
I am running my nextjs app through an okd cluster and apache and i get this error
header with value `x.apps.okd.example.com` does not match `origin` header with value `x.example.com` from a forwarded Server Actions request


Is it possible to ignore this check? Changing behavior in nextjs or spoofing the x-forwarded-host in the okd cluster seems to be my only options.

5 Replies

i face the same problem too and ended up spoofing the header and implementing my own csrf protection
in this case though from the error message, it looks like ["*.example.com"] will suffice
Dwarf CrocodileOP
I just spoofed the okd route as well
Seemed like the easier option for me