Slim looks to be doing exactly what it is supposed to do. The issue is your server configuration as you are running HTTPS under port 80, which is not standard. You will either need to change your server configuration to run under the standard HTTPS port (443), or perhaps set a Twig global variable at runtime with your desired base URL.
In instances such as yours, the most common reason is that your server environment is running behind some sort of caching server or CDN. So while the request is HTTPS, the front caching server is HTTPS, but Apache behind the scenes is running on port 80.
What I do in similar instances is described in this post.