feat: Add ugly CORS headers

This commit is contained in:
Clément Renault 2018-09-18 10:59:36 +02:00
parent 2484ef80bc
commit c8728c57af

View File

@ -105,7 +105,8 @@ fn main() {
let body = search(meta.clone(), db.clone(), &common_words, &query.query).unwrap();
body
})
.with(warp::reply::with::header("Content-Type", "application/json"));
.with(warp::reply::with::header("Content-Type", "application/json"))
.with(warp::reply::with::header("Access-Control-Allow-Origin", "*"));
warp::serve(routes).run(([127, 0, 0, 1], 3030));
}