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");
|
log::info!("starting HTTP server at http://localhost:4242");
|
||||||
|
|
||||||
HttpServer::new(|| {
|
HttpServer::new(|| {
|
||||||
let cors = Cors::default()
|
// let cors = Cors::default()
|
||||||
.send_wildcard()
|
// .send_wildcard()
|
||||||
.allowed_origin("https://tfcconnection.org")
|
// .allowed_origin("https://tfcconnection.org")
|
||||||
.allowed_origin("http://localhost:1313")
|
// .allowed_origin("http://localhost:1313")
|
||||||
.allowed_origin("http://127.0.0.1:1313")
|
// .allowed_origin("http://127.0.0.1:1313")
|
||||||
.allow_any_origin()
|
// .allow_any_origin()
|
||||||
.allow_any_method()
|
// .allow_any_method()
|
||||||
.allow_any_header()
|
// .allow_any_header()
|
||||||
.max_age(3600);
|
// .max_age(3600);
|
||||||
|
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(middleware::Logger::default())
|
.wrap(middleware::Logger::default())
|
||||||
.wrap(cors)
|
|
||||||
.app_data(TempFileConfig::default().directory("./tmp"))
|
.app_data(TempFileConfig::default().directory("./tmp"))
|
||||||
.service(mt_form)
|
.service(mt_form)
|
||||||
.service(health_form)
|
.service(health_form)
|
||||||
|
|
Loading…
Reference in a new issue