mirror of
https://codeberg.org/tyy/aspm
synced 2024-12-22 20:39:29 -07:00
Fix all post requests being rejected
This commit is contained in:
parent
0a877d639b
commit
0c5452a1b8
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ async fn post_request(
|
|||
data: String,
|
||||
content_type: web::Header<header::ContentType>,
|
||||
) -> impl Responder {
|
||||
if content_type.to_string().as_str() != "application/asp+jwt; charset=UTF-8" {
|
||||
if content_type.to_string().as_str() != "application/asp+jwt; charset=utf-8" {
|
||||
return HttpResponse::BadRequest()
|
||||
.body("Content type header was not set to \"application/asp+jwt; charset=UTF-8\"");
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ async fn post_request(
|
|||
| AspeRequestVariant::Delete { aspe_uri } = &request.request
|
||||
{
|
||||
if aspe_uri != &format!("aspe:{}:{}", &state.domain, &key.fingerprint) {
|
||||
return HttpResponse::BadRequest().finish();
|
||||
return HttpResponse::BadRequest().body("ASPE uri did not match key and domain");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue