So, I'm trying to create a redirection middleware (without copying / importing a crate) that just gets a port and redirects that traffic towards a new port with a certain scheme / protocol. The problem is it doesn't work!
I am making two servers (of type HttpServer): upgrade_server on http://localhost:8080 and website_server on https://localhost:8443. They work nicely if I put normal behaviour logic (services, routes, etc) - even with ssl, but my middleware is completely ignored. If I run the servers where my upgrade_server uses my middleware only (which should suffice) then I get a 404 - not found error instead of being redirected to my website_server. Can anyone help me out?