Why server action request use "content-type: text/plain", this will cause the default WAF rule block the request. #77635
Unanswered
youweol-master
asked this question in
App Router
Replies: 1 comment
-
Answered this here: #72961 (comment) Repeating for future reference: Server Actions are a React feature, and changes to their mechanics, ought to be suggested over there at their repository, however, we can of course, explore and learn together, about them here at Next.js' side. Server Actions, not used directly in forms, use |
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
-
I'm using the nextjs framework with nginx + modsecurity in front of it.
I've found the ServerAction request is send http POST request use "content-type: text/plain" header, but not "content-type: application/json"
nextjs fetchServerAction() src code
due to the document from coreruleset
with the default WAF configure, it will block POST with request "content-type: text/plain".
I suggest the fetchServerAction src code should add "content-type: application/json" header.
Beta Was this translation helpful? Give feedback.
All reactions