mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
feat: Add HSTS headers to response (#725)
This commit is contained in:
@ -518,8 +518,11 @@ impl actix_web::ResponseError for StripeErrorCode {
|
||||
fn error_response(&self) -> actix_web::HttpResponse {
|
||||
use actix_web::http::header;
|
||||
|
||||
use crate::consts;
|
||||
|
||||
actix_web::HttpResponseBuilder::new(self.status_code())
|
||||
.insert_header((header::CONTENT_TYPE, mime::APPLICATION_JSON))
|
||||
.insert_header((header::STRICT_TRANSPORT_SECURITY, consts::HSTS_HEADER_VALUE))
|
||||
.insert_header((header::VIA, "Juspay_Router"))
|
||||
.body(self.to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user