glidernet / ogn-ddb

OGN Devices DataBase
11 stars 15 forks source link

Force redirect to HTTPS from HTTP #44

Open clementallen opened 5 years ago

clementallen commented 5 years ago

Currently, it is possible to visit and use the ddb over HTTP without the page redirecting to HTTPS.

image

snip commented 5 years ago

If we redirect all trafic some clients which automatic retrieve for example http://ddb.glidernet.org/download/ may fail as not supporting https.

So yes redirecting to HTTPS but from the HTML page (but not all trafic) can be useful.

PR welcome.

clementallen commented 5 years ago

Not sure this is something that can be achieved through a pull request, right? Seems more of an Nginx/Apache config thing on the server

snip commented 5 years ago

This can be done at HTML level with some javascript i think.

snip commented 5 years ago

Example of application using HTTP: https://github.com/Turbo87/ogn-web-gateway/blob/master/src/ogn_ddb.rs#L70