diff options
author | metamuffin <metamuffin@disroot.org> | 2024-05-30 00:06:08 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-05-30 00:06:08 +0200 |
commit | 44c47b3c2a2ec3e9c9c0efac4dceaec082a62d60 (patch) | |
tree | 690ed35436237796f9835fc7c2430cbed1a4b7d6 /src/filters/auth/cookie.rs | |
parent | 29c48afafb4a6a0a0636774f9b56423881fb1703 (diff) | |
download | gnix-44c47b3c2a2ec3e9c9c0efac4dceaec082a62d60.tar gnix-44c47b3c2a2ec3e9c9c0efac4dceaec082a62d60.tar.bz2 gnix-44c47b3c2a2ec3e9c9c0efac4dceaec082a62d60.tar.zst |
document cookie auth and such
Diffstat (limited to 'src/filters/auth/cookie.rs')
-rw-r--r-- | src/filters/auth/cookie.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/filters/auth/cookie.rs b/src/filters/auth/cookie.rs index c1847ce..620911d 100644 --- a/src/filters/auth/cookie.rs +++ b/src/filters/auth/cookie.rs @@ -52,7 +52,7 @@ impl Node for CookieAuth { request: NodeRequest, ) -> Pin<Box<dyn Future<Output = Result<NodeResponse, ServiceError>> + Send + Sync + 'a>> { Box::pin(async move { - if request.method() == Method::POST { + if request.method() == Method::POST && request.uri().path() == "/_gnix_login" { let referrer = request.headers().get(REFERER).cloned(); let d = request .into_body() @@ -62,6 +62,7 @@ impl Node for CookieAuth { .unwrap(); let d = String::from_utf8(d.to_bytes().to_vec()).unwrap(); + // TODO proper parser let mut username = "user"; let mut password = ""; for kv in d.split("&") { |