Replies: 1 comment
-
I have a workaround in NGINX: Having lost a couple of days on this I suspect (but cannot entirely prove) that in the nextjs code the serverActions.allowedOrigins is not populated at the time it is needed in the call to isCsrfOriginAllowed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
serverActions.allowedOrigins isnt working for me. Please can you advise what I'm missing?
The architecture is nginx > nextjs in Azure Container Apps. Only nginx is exposed on mysubdomain.domain.com. nginx proxies requests to nextjs using the ACA internal hostname. This results in an error:
I tried upgrading to 14.2.3.
Then I realised my original next.config.js wasnt being picked up so I converted it to next.config.mjs. I tested to make sure it was being picked up and it is (the upgrade resulted in some obsolete values)
I looked at the nextjs code, and decided that the only possibility is that serverActions.allowedOrigins is still not being populated.
I wrote a test using the function code from the repo source, and it worked fine.
Any ideas you have would be amazing. Thanks!
next.config.mjs:
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions