aunefyren / wrapperr

Website based application that summarizes Plex statistics from a given period and displays it in a nice format. Similar to the Spotify Wrapped concept.
314 stars 22 forks source link

SSL #70

Closed wbshaw closed 1 year ago

wbshaw commented 1 year ago

Is there any option to add SSL? Reason being - when the link gets shared over WhatsApp, even if the link is http:// when it is clicked on it opens as https:// and the user just gets an error until they manually edit the URL.

aunefyren commented 1 year ago

Hey, by adding SSL, do you mean an option to install a certificate?

HTTP->HTTPS redirection is not really done by Wrapperr, and is typically executed by the DNS provider, proxy service or by the app/site opening the link. The exception however is two ports. If you are using port 80, many browsers will assume HTTP, at 443 they will assume HTTPS. I can open a HTTP link like this http://192.168.1.1:8282/ and the site loads.

People hosting open source applications, which they want to share outside their own network, typically utilize a reverse proxy for simplicity, security and certificate management. Options like Nginx, Traefik and Cloudflare tunnels allow you to share services with automatic certificate-retrieval from providers like Let's Encrypt and Cloudflare.

Because of reverse proxies, many projects don't bother with certificate options, as this can be done by the reverse proxy.

wbshaw commented 1 year ago

Yeah - to be able to add a certificate essentially, just so that one is presented should a user get forced over https.

Just to clarify the issue I had with mobile users: 1) Link is sent to users in WhatsApp as http://mywrapperrurl:8282 2) User clicks on the link from WhatsApp (which still shows as http://mywrapperrurl:8282) 3) Link opens in Chrome Android but as https://mywrapperrurl:8282 4) Generic SSL Invalid response error is shown (as there is no SSL on that endpoint) - User has to manually edit the URL to remove the 's' from https

I will look into a reverse proxy, but haven't bothered yet as haven't really needed. Appreciate this is an external problem for you and really is to do with WhatsApp and Android/Chrome, but couldn't find any detail on it as to why it happens.

aunefyren commented 1 year ago

Fixed in v3.2.0.