Read the http header from the proxy to get the client IP

This commit is contained in:
Greg Burri 2022-11-27 02:01:23 +01:00
parent b6235fb76c
commit 8a3fef096d
6 changed files with 29 additions and 25 deletions

View file

@ -3,4 +3,5 @@ pub const FILE_CONF: &str = "conf.ron";
pub const DB_DIRECTORY: &str = "data";
pub const DB_FILENAME: &str = "recipes.sqlite";
pub const SQL_FILENAME: &str = "sql/version_{VERSION}.sql";
pub const VALIDATION_TOKEN_DURATION: i64 = 1 * 60 * 60; // 1 hour. [s].
pub const VALIDATION_TOKEN_DURATION: i64 = 1 * 60 * 60; // 1 hour. [s].
pub const REVERSE_PROXY_IP_HTTP_FIELD: &str = "x-real-ip";