I've been learning more about hosting my own web server and specifically one with HTTPS, and was wondering what the best practice is.
Should you handle the HTTPS in the application itself or should you make a separate proxy application to put between it that handles all the HTTPS stuff so your application doesn't have to?
My personal example in case my question isn't clear:
I now have 2 separate Node applications running on my server, and I wanted to have them accessible using the same domain name but separate paths.
So App1 uses /app1/
and App2 uses /app2/
I then found http-proxy-middleware which is able to do this. But then I discovered that it was also possible to handle the HTTPS stuff this way.
This meant that I was able to strip out all the things about handling HTTPS from my applications, and just let the proxy do it.
I image using the proxy is the preferred way, but I have no idea whether there are some hidden downsides or something.