gbrian / grafana-simple-sql-datasource

Grafana SQL datasource
MIT License
62 stars 20 forks source link

HTTPS doesn't allow SQL proxy to work #7

Open jerrodtracy opened 7 years ago

jerrodtracy commented 7 years ago

SQL proxy is working perfect with grafana using the default http and port 3000. When trying to set protocol to https on port 3000 (or any port), or trying to use apache as a proxy for https it fails with the following Error {"err":{"data":null,"status":-1,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"http://grafana:666/?con=mssql://user:password@sqlIP/DB","data":{"type":"test","body":null,"url":"mssql://user:password@sqlIP/DB"},"retry":0,"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json;charset=utf-8"}},"statusText":""},"cancelled":true}

gbrian commented 7 years ago

Hi @jerrodtracy ,

Ops, HTTPS is on the TODOs list so never tested. The proxy server uses Express module so it needs some tweaks to enable HTTPS (http://blog.mgechev.com/2014/02/19/create-https-tls-ssl-application-with-express-nodejs/) BTW it shoud be possible to wrap your proxy with an apache/nginx managing the secure layer and communicating plain HTTP to the proxy, isn't it? So what's the problem with apache? Have you tried the apahe option with another site to check if it works?

Thanks

jerrodtracy commented 7 years ago

@gbrian ,

Thanks for responding back. I'll do some additional testing this week if I can find time.