ProxyRequest
Proxy request object.
This object encapsulates the incoming request and represents the request that will be sent to the target server. It exposes properties and methods to manipulate the request before it is executed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
URL
|
The target server URL. |
required |
in_req
|
Request
|
The incoming request object. |
required |
Source code in aiorp/request.py
load_content()
async
Load the content of the incoming request if it can be read.
set_x_forwarded_for(clean=False)
Set the X-Forwarded related headers.
By default, appends the current remote address to the existing X-Forwarded-For header if one exists, and sets the X-Forwarded-Host header to the incoming host. If clean is set to True, the existing X-Forwarded-For header will be ignored and only the current remote address will be set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clean
|
bool
|
If True, ignore the existing X-Forwarded-For header. |
False
|