remove cors
This commit is contained in:
parent
3f1cb91895
commit
d2d9eb5735
19
src/main.rs
19
src/main.rs
|
@ -49,19 +49,18 @@ async fn main() -> std::io::Result<()> {
|
|||
log::info!("starting HTTP server at http://localhost:4242");
|
||||
|
||||
HttpServer::new(|| {
|
||||
let cors = Cors::default()
|
||||
.send_wildcard()
|
||||
.allowed_origin("https://tfcconnection.org")
|
||||
.allowed_origin("http://localhost:1313")
|
||||
.allowed_origin("http://127.0.0.1:1313")
|
||||
.allow_any_origin()
|
||||
.allow_any_method()
|
||||
.allow_any_header()
|
||||
.max_age(3600);
|
||||
// let cors = Cors::default()
|
||||
// .send_wildcard()
|
||||
// .allowed_origin("https://tfcconnection.org")
|
||||
// .allowed_origin("http://localhost:1313")
|
||||
// .allowed_origin("http://127.0.0.1:1313")
|
||||
// .allow_any_origin()
|
||||
// .allow_any_method()
|
||||
// .allow_any_header()
|
||||
// .max_age(3600);
|
||||
|
||||
App::new()
|
||||
.wrap(middleware::Logger::default())
|
||||
.wrap(cors)
|
||||
.app_data(TempFileConfig::default().directory("./tmp"))
|
||||
.service(mt_form)
|
||||
.service(health_form)
|
||||
|
|
Loading…
Reference in a new issue