Skip to content

Intercept and reject requests based on body content #244

@ortonomy

Description

@ortonomy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions