Datasource Plugin URL problem

Hello,

I have a problem with url send. When I made a console.log in my file datasource.ts, I have the good url : http://localhost:3001/ but when I check the network, I have this url : http://localhost:3001/?datasource=[object%20Object]&refId=A

Did someone know where to change this ?

Nicolas

Hi @nicolasdossantos248. Grafana wraps the original url in an internal url so the requests goes through the Grafana server instead of directly through the browser. The request should arrive to the correct URL if you use the correct Grafana APIs (fetch from getBackendSrv()). You can see an example here grafana-plugin-examples/DataSource.ts at main · grafana/grafana-plugin-examples · GitHub

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.