Closed heibor closed 5 years ago
Did you enable ssl feature?
How to enable the ssl
feature? modify the code ? or modify the Cargo.toml?
See how to choose features in Cargo.toml https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features
We have free separate SSL related features: https://github.com/actix/actix-web/blob/0.7/Cargo.toml#L34-L44
Thank you, I solved my question by change actix-web = "^0.7"
to actix-web = { version = "^0.7", features=["ssl"] }
.
See https://github.com/actix/actix-web/blob/master/examples/client.rs for how to use SSL with modern Actix
When I run the http-proxy example, I used
curl http://127.0.0.1:8080/streaming
, I got an error message: ERROR 2019-03-28T09:34:05Z: actix_web::pipeline: Error occurred during request handling, status: 502 Bad Gateway Failed to connect to host: SSL is not supported INFO 2019-03-28T09:34:05Z: actix_web::middleware::logger: 127.0.0.1:52863 "GET /streaming HTTP/1.1" 502 0 "-" "curl/7.54.0" 0.001003Is there something I missing?