API: Recognize MSSQL data source URLs (#25629)

* API: Recognize MSSQL URLs

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Move MSSQL URL validation into mssql package

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit d352c213b3)
This commit is contained in:
Arve Knudsen
2020-06-17 11:17:11 +02:00
committed by Dominik Prokop
parent 4f58ca11da
commit 45e6acabb3
5 changed files with 133 additions and 26 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func (lw *logWrapper) Write(p []byte) (n int, err error) {
// NewDataSourceProxy creates a new Datasource proxy
func NewDataSourceProxy(ds *models.DataSource, plugin *plugins.DataSourcePlugin, ctx *models.ReqContext,
proxyPath string, cfg *setting.Cfg) (*DataSourceProxy, error) {
targetURL, err := datasource.ValidateURL(ds.Url)
targetURL, err := datasource.ValidateURL(ds.Type, ds.Url)
if err != nil {
return nil, err
}