Server Actions
Answered
TyZreX posted this in #help-forum
TyZreXOP
x-forwarded-host and host headers do not match origin header from a forwarded Server Actions request. Aborting the action.Answered by TyZreX
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
10 Replies
have a look at: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations#allowed-origins-advanced as its a security thing which you can change to your needs
TyZreXOP
It was nginx issue but anyways thank you
ah ok sounds good
@TyZreX It was nginx issue but anyways thank you
for future people, is there something you could share that you did to fix :)
TyZreXOP
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
Answer
i think this may be better suited to make another thread!
TyZreXOP
Sure