Remove duplicated Gitlab token check

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-07-14 00:58:33 +02:00
parent 6903490ace
commit bdbc8b6382
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -56,12 +56,6 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
return Err(Error::InvalidContentType); return Err(Error::InvalidContentType);
} }
if let Some(val) = headers.get("X-Gitlab-Token")
&& secret != val
{
return Err(Error::InvalidSecret);
}
// Get payload and generate hmac signature // Get payload and generate hmac signature
let mut payload: Vec<u8> = vec![]; let mut payload: Vec<u8> = vec![];
let whole_body = req.collect().await?.aggregate(); let whole_body = req.collect().await?.aggregate();