How to whitelist paths and/or http verbs?
See original GitHub issueI can’t seem to find an example in the documentation for either of these.
Is there a way to see the full payload for
query_engine: "jp",
query: "$.login",
?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Access-Control-Allow-Methods - HTTP - MDN Web Docs
The Access-Control-Allow-Methods response header specifies one or more methods allowed when accessing a resource in response to a preflight ...
Read more >Why should someone block all methods other than GET ...
The reason this best practice exists is because of the HTTP Verb ... Reject all requests not matching the whitelist with HTTP response...
Read more >no-http-verbs-in-paths
Disallows HTTP verbs used in paths. ... The REST type prefers to name paths after resources like "customers", and "payments".
Read more >The request was rejected because the HTTP method ...
The request was rejected because the HTTP method "CONNECT" was not included within the whitelist [HEAD, DELETE, POST, GET, OPTIONS, PATCH, PUT].
Read more >Whitelist based on HTTP verb · Issue #462 · openflagr/flagr
Currently, whitelisting is based solely on path. There is no way to allow only GET access to a path. Is there any way...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve added the necessary bits to the server to cope with this. Once it lands you’ll be able to do something like this:
The idea being, if the
noopplugin is executed it always returns a 200 and therefore stops the pipeline. Keep in mind that each rule is a logical and so all must pass for the pcb to take effect. In this case it’s slightly confusing because we’re using thenegateattribute combined with the fact that it’s a skip procedure (basically a double negative). However, the end result of the above is, this plugin is skipped unless it’s a POST to/foo/... Implicitlynooppasses if invoked so if it’s not skipped, then request is allowed. If you want to OR logic of this nature then add multiplenoopplugins inside the pipeline.Having said all that, it’s much easier to use
request_jsplugin if feasible as the ability to do complex logic can be expressed much easier using pure code.OK, there are really 2 approaches:
pcblogicsUsing
request_jsalready has access toparentReqInfowhich includes all the info you would need to check verb, path, etc and make decisions. I’ve already got adding that info to thepcblogic queued up to make it work using that mechanism as well.