Is this possible to build a backend plugin that send front and back HTTP requests?

Hello,

I’ve added the route elastic as shown :

"routes" : [
    {
      "path" : "elastic",
      "url" : "{{ .JsonData.elasticSearchPath }}",
      "method" : "POST",
      "headers" : [
        {
          "name" : "Accept",
          "content" : "application/json"
        },
        {
          "name" : "Content-Type",
          "content" : "application/json"
        }
      ]
    }
  ]

Then send my request in datasource.ts by :

const fullURLbyProxy = this.url + "/elastic/";
console.log("🧀 fullURLbyProxy : ", fullURLbyProxy)
const response = await getBackendSrv()
      .fetch({
        url: fullURLbyProxy,
        method: 'POST',
        data: postData,
        headers: this.getESAuthorizationHeaders(),
      })

This is the result :

I think the fullURLbyProxy has the right value.

How can I confirm that .JsonData.elasticSearchPath has the good value ? Where can I display it ?

If it can help, here are the docker logs :

logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/datasources/proxy/uid/f1555d2f-9718-43a1-85b4-9d9b0a0136f2/elastic/ remote_addr=172.20.0.1 referer="http://localhost:3000/d/abc5e5d5-46ae-44c7-b78b-aff6188e6804/new-dashboard?orgId=1" t=2024-01-24T15:01:13.956532809Z level=error msg="Proxy request failed" err="Bad Gateway"
logger=context userId=1 orgId=1 uname=admin t=2024-01-24T15:01:13.956653841Z level=error msg="Request Completed" method=POST path=/api/datasources/proxy/uid/f1555d2f-9718-43a1-85b4-9d9b0a0136f2/elastic/ status=502 remote_addr=172.20.0.1 time_ms=71 duration=71.001708ms size=0 referer="http://localhost:3000/d/abc5e5d5-46ae-44c7-b78b-aff6188e6804/new-dashboard?orgId=1" handler=/api/datasources/proxy/uid/:uid/*

(new-dashboard is the name of the dashboard where I try to request Elastic.)

If .JsonData.elasticSearchPath has the good value (which I write in the Configuration page of the plugin), how can I deeply debug my issue ?

Thank you