Open WABA-Comms opened 7 years ago
Here's an old PR for this: https://github.com/dcfemtech/hackforgood-waba-map/pull/7
Also, the original issue: https://github.com/dcfemtech/hackforgood-waba-map/issues/2
If someone can add https://github.com/dcfemtech/hackforgood-waba-map/pull/7 to our current codebase but with a lower zoom level (11-14) instead of 16 (see https://github.com/dcfemtech/hackforgood-waba-map/pull/7#commitcomment-18013906) then I'll gladly merge this!
We will need to make sure that it is served over HTTPS, Chrome disabled location over insecure hosts: https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins
If you try to use it on chrome right now, you get this error:
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
@mdelcambre GitHub recently added HTTPS support to all GitHub pages sites in June 2016 (see https://github.com/blog/2186-https-for-github-pages) so I think we're good here! We're using HTTPS: https://dcfemtech.github.io/hackforgood-waba-map/.
Testing locally right over HTTP will throw an error though. The WABA website is also served over HTTP (http://www.waba.org/) - so this will throw assorted mixed content errors if we embed the project on their website (cc @nellepierson).
You could get around the local testing issue by generating your own self-signed certificate with OpenSSL
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -subj '/C=US/ST=DC/O=Test' -nodes
Then using a local web server to use the above cert. Looks like serve
does support HTTPS per the readme but I am getting the following errors when trying to test locally:
alexandraulsh@Bikini-Kill hackforgood-waba-map* master $ serve -s
error: unknown option `-s'
alexandraulsh@Bikini-Kill hackforgood-waba-map* master $ serve --https
error: unknown option `--https'
Yes I noticed after I commented that because we use github pages, it is secure.
For server, the https options appear to have been added after the last release. git blame shows those options on Mar 30, 2014 and the latest (1.4.0) was released Mar 13, 2014
Not much more to add, other than we love this idea! @alulsh, anything else to add?