Skip to content

Commit

Permalink
Expand handleInitialRequest documentation #335
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob--W committed Mar 17, 2021
1 parent 9f1af82 commit 4c18680
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ proxy requests. The following options are supported:
Example: `['https://good.example.com', 'http://good.example.com']`
* function `handleInitialRequest` - If set, it is called with the request, response and a parsed
URL of the requested destination (null if unavailable). If the function returns true, the request
will not be handled further. It is the responsibility of the function to handle the request.
will not be handled further. Then the function is responsible for handling the request.
This feature can be used to passively monitor requests, for example for logging (return false).
* function `checkRateLimit` - If set, it is called with the origin (string) of the request. If this
function returns a non-empty string, the request is rejected and the string is send to the client.
* boolean `redirectSameOrigin` - If true, requests to URLs from the same origin will not be proxied but redirected.
Expand Down

0 comments on commit 4c18680

Please sign in to comment.