feat: Add HSTS headers to response (#725)

This commit is contained in:
Kartikeya Hegde
2023-03-10 14:49:58 +05:30
committed by GitHub
parent c085e460be
commit 7ed665ecec
7 changed files with 34 additions and 13 deletions

View File

@ -25,6 +25,7 @@ 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())
}