Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-04-19 17:05:38 +02:00
parent 861f26b9e4
commit 2f645d4200
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -44,8 +44,9 @@ async fn webhooks_inner(req: Request<Body>, token: &str) -> Result<WebHook, Erro
debug!("Headers: {:?}", req.headers());
let headers = req.headers();
if let Some(content_type) = headers.get(header::CONTENT_TYPE) &&
let Some(header_token) = headers.get("X-Gitlab-Token") {
if let Some(content_type) = headers.get(header::CONTENT_TYPE)
&& let Some(header_token) = headers.get("X-Gitlab-Token")
{
if content_type != "application/json" {
return Err(Error::InvalidContentType);
}