fix: bug with Actix redirects (#2246)

This commit is contained in:
Greg Johnston 2024-01-31 09:14:40 -05:00 committed by GitHub
parent 595013579c
commit a834c03974
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,14 +150,6 @@ pub fn redirect(path: &str) {
to redirect()."
);
}
if let Some(response_options) = use_context::<ResponseOptions>() {
response_options.set_status(StatusCode::FOUND);
response_options.insert_header(
header::LOCATION,
header::HeaderValue::from_str(path)
.expect("Failed to create HeaderValue"),
);
}
}
/// An Actix [struct@Route](actix_web::Route) that listens for a `POST` request with