Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL not supported in http-proxy #96

Closed
heibor opened this issue Mar 28, 2019 · 5 comments
Closed

SSL not supported in http-proxy #96

heibor opened this issue Mar 28, 2019 · 5 comments

Comments

@heibor
Copy link

heibor commented Mar 28, 2019

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.001003

Is there something I missing?

@fafhrd91
Copy link
Member

Did you enable ssl feature?

@heibor
Copy link
Author

heibor commented Mar 28, 2019

How to enable the ssl feature? modify the code ? or modify the Cargo.toml?

@DoumanAsh
Copy link
Contributor

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

@heibor
Copy link
Author

heibor commented Mar 28, 2019

Thank you, I solved my question by change actix-web = "^0.7" to actix-web = { version = "^0.7", features=["ssl"] }.

@esemeniuc
Copy link

See https://github.com/actix/actix-web/blob/master/examples/client.rs for how to use SSL with modern Actix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants