This commit is contained in:
parent
2e86c05deb
commit
065d22d6f4
@ -172,6 +172,12 @@ impl Fairing for CORS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Catches all OPTION requests in order to get the CORS related Fairing triggered.
|
||||||
|
#[options("/<_..>")]
|
||||||
|
fn all_options() {
|
||||||
|
/* Intentionally left empty */
|
||||||
|
}
|
||||||
|
|
||||||
#[rocket::main]
|
#[rocket::main]
|
||||||
async fn main() -> GResult {
|
async fn main() -> GResult {
|
||||||
println!("Program start");
|
println!("Program start");
|
||||||
@ -211,6 +217,7 @@ async fn main() -> GResult {
|
|||||||
.mount(
|
.mount(
|
||||||
"/",
|
"/",
|
||||||
routes![
|
routes![
|
||||||
|
all_options,
|
||||||
index,
|
index,
|
||||||
quit,
|
quit,
|
||||||
reload,
|
reload,
|
||||||
|
Loading…
Reference in New Issue
Block a user