mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
Expand handleInitialRequest documentation #335
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user