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.
100 lines
2.1 KiB
TOML
100 lines
2.1 KiB
TOML
[package]
|
|
name = "conduwuit_api"
|
|
description.workspace = true
|
|
edition.workspace = true
|
|
homepage.workspace = true
|
|
license.workspace = true
|
|
readme.workspace = true
|
|
repository.workspace = true
|
|
version.workspace = true
|
|
|
|
[lib]
|
|
path = "mod.rs"
|
|
crate-type = [
|
|
"rlib",
|
|
# "dylib",
|
|
]
|
|
|
|
[features]
|
|
brotli_compression = [
|
|
"conduwuit-core/brotli_compression",
|
|
"conduwuit-service/brotli_compression",
|
|
"reqwest/brotli",
|
|
]
|
|
element_hacks = [
|
|
"conduwuit-service/element_hacks",
|
|
]
|
|
gzip_compression = [
|
|
"conduwuit-core/gzip_compression",
|
|
"conduwuit-service/gzip_compression",
|
|
"reqwest/gzip",
|
|
]
|
|
io_uring = [
|
|
"conduwuit-service/io_uring",
|
|
]
|
|
jemalloc = [
|
|
"conduwuit-core/jemalloc",
|
|
"conduwuit-service/jemalloc",
|
|
]
|
|
jemalloc_conf = [
|
|
"conduwuit-core/jemalloc_conf",
|
|
"conduwuit-service/jemalloc_conf",
|
|
]
|
|
jemalloc_prof = [
|
|
"conduwuit-core/jemalloc_prof",
|
|
"conduwuit-service/jemalloc_prof",
|
|
]
|
|
jemalloc_stats = [
|
|
"conduwuit-core/jemalloc_stats",
|
|
"conduwuit-service/jemalloc_stats",
|
|
]
|
|
release_max_log_level = [
|
|
"conduwuit-core/release_max_log_level",
|
|
"conduwuit-service/release_max_log_level",
|
|
"log/max_level_trace",
|
|
"log/release_max_level_info",
|
|
"tracing/max_level_trace",
|
|
"tracing/release_max_level_info",
|
|
]
|
|
zstd_compression = [
|
|
"conduwuit-core/zstd_compression",
|
|
"conduwuit-service/zstd_compression",
|
|
"reqwest/zstd",
|
|
]
|
|
|
|
[dependencies]
|
|
async-trait.workspace = true
|
|
axum-extra.workspace = true
|
|
axum.workspace = true
|
|
base64.workspace = true
|
|
bytes.workspace = true
|
|
client-ip.workspace = true
|
|
conduwuit-core.workspace = true
|
|
conduwuit-macros.workspace = true
|
|
conduwuit-service.workspace = true
|
|
const-str.workspace = true
|
|
ctor.workspace = true
|
|
dtor.workspace = true
|
|
futures.workspace = true
|
|
hmac.workspace = true
|
|
http.workspace = true
|
|
http-body-util.workspace = true
|
|
hyper.workspace = true
|
|
ipaddress.workspace = true
|
|
itertools.workspace = true
|
|
lettre.workspace = true
|
|
log.workspace = true
|
|
rand.workspace = true
|
|
reqwest.workspace = true
|
|
assign.workspace = true
|
|
ruma.workspace = true
|
|
ruminuwuity.workspace = true
|
|
serde_html_form.workspace = true
|
|
serde_json.workspace = true
|
|
serde.workspace = true
|
|
sha1.workspace = true
|
|
tokio.workspace = true
|
|
tracing.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|