fix: riot sometimes freaks out when refreshing
This commit is contained in:
parent
d544d28b6e
commit
eb4af85765
2 changed files with 13 additions and 7 deletions
|
@ -135,9 +135,6 @@ where
|
|||
match http_response {
|
||||
Ok(http_response) => {
|
||||
let mut response = rocket::response::Response::build();
|
||||
response
|
||||
.sized_body(Cursor::new(http_response.body().clone()))
|
||||
.await;
|
||||
|
||||
let status = http_response.status();
|
||||
response.raw_status(status.into(), "");
|
||||
|
@ -147,6 +144,10 @@ where
|
|||
.raw_header(header.0.to_string(), header.1.to_str().unwrap().to_owned());
|
||||
}
|
||||
|
||||
response
|
||||
.sized_body(Cursor::new(http_response.into_body()))
|
||||
.await;
|
||||
|
||||
response.raw_header("Access-Control-Allow-Origin", "*");
|
||||
response.raw_header(
|
||||
"Access-Control-Allow-Methods",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue