adding narrower cors?
This commit is contained in:
parent
d8a9058153
commit
03922bbd08
|
@ -49,8 +49,11 @@ async fn main() -> std::io::Result<()> {
|
||||||
log::info!("starting HTTP server at http://localhost:4242");
|
log::info!("starting HTTP server at http://localhost:4242");
|
||||||
|
|
||||||
HttpServer::new(|| {
|
HttpServer::new(|| {
|
||||||
let mut cors = Cors::default()
|
let cors = Cors::default()
|
||||||
.allow_any_origin()
|
.send_wildcard()
|
||||||
|
.allowed_origin("https://tfcconnection.org")
|
||||||
|
.allowed_origin("http://localhost:1313")
|
||||||
|
.allowed_origin("http://127.0.0.1:1313")
|
||||||
.allow_any_method()
|
.allow_any_method()
|
||||||
.allow_any_header()
|
.allow_any_header()
|
||||||
.max_age(3600);
|
.max_age(3600);
|
||||||
|
|
Loading…
Reference in a new issue