mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
WIP: ws: parse X-FORWARDED-FOR headers
This commit is contained in:
parent
9f9015d51c
commit
3b94b8e588
5 changed files with 85 additions and 24 deletions
|
|
@ -70,6 +70,11 @@ pub struct NetworkConfig {
|
|||
pub websocket_max_message_size: usize,
|
||||
pub websocket_max_frame_size: usize,
|
||||
|
||||
/// Trust X-Forwarded-For headers to get peer IP. Only use this if you are
|
||||
/// running aquatic_ws behind a reverse proxy that sets them and your
|
||||
/// instance is not accessible by other means.
|
||||
pub trust_x_forwarded_for: bool,
|
||||
|
||||
/// Return a HTTP 200 Ok response when receiving GET /health, but only
|
||||
/// when not running over TLS
|
||||
pub enable_http_health_checks: bool,
|
||||
|
|
@ -89,6 +94,8 @@ impl Default for NetworkConfig {
|
|||
websocket_max_message_size: 64 * 1024,
|
||||
websocket_max_frame_size: 16 * 1024,
|
||||
|
||||
trust_x_forwarded_for: false,
|
||||
|
||||
enable_http_health_checks: false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue