Remove duplicated Gitlab token check
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
6903490ace
commit
bdbc8b6382
1 changed files with 0 additions and 6 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue