feat(middleware): add middleware to attach default response headers (#824)

This commit is contained in:
Sanchith Hegde
2023-04-04 11:26:05 +05:30
committed by GitHub
parent 35d3e27724
commit 6d7b11a0f0
9 changed files with 23 additions and 49 deletions

View File

@ -25,8 +25,6 @@ impl actix_web::ResponseError for ApiErrorResponse {
actix_web::HttpResponseBuilder::new(self.status_code())
.insert_header((header::CONTENT_TYPE, mime::APPLICATION_JSON))
.insert_header((header::STRICT_TRANSPORT_SECURITY, "max-age=31536000"))
.insert_header((header::VIA, "Juspay_Router"))
.body(self.to_string())
}
}