I want to be able to intercept and reject a request through the proxy by examining body content.
For example, my request coming through is a grapql query or mutation in body of POST
mutation {
registerUser ( ... ) {
...
}
}
and I want to be able to examine the content body for registerUser (or something else) and reject with a 403 - Forbidden.
I feel it's similar, but the opposite to here: #97
So I'd like to use onProxyReq, but I dont' know how to read the body and then make an action using req / res. Anyone can help?
I want to be able to intercept and reject a request through the proxy by examining body content.
For example, my request coming through is a grapql query or mutation in
bodyofPOSTand I want to be able to examine the content body for
registerUser(or something else) and reject with a403 - Forbidden.I feel it's similar, but the opposite to here: #97
So I'd like to use
onProxyReq, but I dont' know how to read the body and then make an action usingreq/res. Anyone can help?