-
Notifications
You must be signed in to change notification settings - Fork 68
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
HTTP and HTTPS on the same port #48
Comments
I think it is out of scope. Keep the issue open for a while in case there is a demand for this. |
I released a crate doing all of this now: https://crates.io/crates/axum-server-dual-protocol. |
When I send http request to my https server, the server just close the connection, reply me nothing, while I expect an error code like 497. |
@hangj I assume you mean this is the current behavior of |
@daxpedda yes, its the current behavior of |
You can't use same port for http and https if you are asking that. You might want to check out |
Thank you, I'll check it out, and see what I can do. |
I wrote an
Accept
or that allows handling of HTTP and HTTPS on the same port.The implementation is fairly minimal and simple. Is it in scope for
axum-server
to add something like this? Happy to start a PR of course.My use-case is hosting a HTTPS server on a custom port, unlike the example, there is only one port. So connecting with HTTP to that server errors out.
The idea is if I accept both protocols, I can design a middleware that handles the redirect.
The text was updated successfully, but these errors were encountered: