HTTP to HTTPS redirection ? #2400
-
Hi, Is that possible to make mongoose do a HTTP to HTTPS redirection (on the same port) with one single (HTTPS) listener ? If not, how can I do it since you can not have a HTTP listener and a HTTPS listener on the same port ? Regards. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That you do at application level. I don't think that can be done at the same port, but nobody prevents you from achieving that. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. Sorry, but technically this is not the same question, because #2183 just wants to redirect a HTTP connection received on one port (ie: 80) to another port as HTTPS (ie: 443). (which is quite easy to do with two listeners) Personally, I want to listen only to HTTPS (ie: 443) and if there is a HTTP request on this port, I want to be able to redirect it (using a 30X response) to the same port but in HTTPS. |
Beta Was this translation helpful? Give feedback.
That you do at application level. I don't think that can be done at the same port, but nobody prevents you from achieving that.
BTW, just searching for "redirect" sends you to #2183 , that already answered a similar question