forked from continuwuation/continuwuity
The current `request_ip_source` setting only allows a single option. While it does fall back to the peer IP if the header is missing as of !2003, which likely covers a lot of regular use, only allowing a single option limits the deployment options available to more advanced deployments. Setups where internal and external traffic use different reverse proxies will end up with the wrong IP and the implicitness of the fallback allows for situations where the used IP is not the IP expected. By introducing a setting that allows multiple options to be set, this limitation is resolved and it becomes possible to have client IP resolution behind different reverse proxies and also making it possible to decide if and/or what the fallback should be. If set, options are evaluated in order. If all fail, the request fails.
21 lines
460 B
Rust
21 lines
460 B
Rust
#![type_length_limit = "16384"] //TODO: reduce me
|
|
#![recursion_limit = "256"] // My Giant Async Function
|
|
#![allow(clippy::toplevel_ref_arg)]
|
|
|
|
extern crate conduwuit_core as conduwuit;
|
|
extern crate conduwuit_service as service;
|
|
|
|
conduwuit_macros::introspect_crate! {}
|
|
|
|
pub mod client;
|
|
pub mod router;
|
|
pub mod server;
|
|
|
|
pub mod client_ip;
|
|
|
|
pub mod admin;
|
|
|
|
pub(crate) use self::router::{Ruma, RumaResponse, State};
|
|
|
|
conduwuit::mod_ctor! {}
|
|
conduwuit::mod_dtor! {}
|