Commit e541a67f authored by Chunchi Che's avatar Chunchi Che

add cors

parent 9926b708
Pipeline #18131 failed with stages
in 4 minutes and 51 seconds
......@@ -28,7 +28,9 @@ async fn main() -> anyhow::Result<()> {
.with(cors);
// TODO: 模块化
let images = warp::path("images").and(warp::fs::dir("./images/"));
let images = warp::path("images")
.and(warp::fs::dir("./images/"))
.with(cors);
warp::serve(deck.or(cards).or(images))
.run(SocketAddr::from_str(SERVE_ADDR)?)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment