Opensearch Dashboard is not able to parse keycloak ipv6 url

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Hello, I am using opensearchproject/opensearch-dashboards:1.3.9 docker image

Describe the issue:
I am using opensearch dashboard with openid configuration (keycloak) on ipv6. But opensearch dashboard is not able to resolve the keycloak ipv6 ip and getting this error

{"type":"log","@timestamp":"2023-10-25T07:35:50Z","tags":["error","plugins","securityDashboards"],"pid":1,"message":"{ Error: getaddrinfo ENOTFOUND [XXXX] [XXXX]:31182\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)\n  errno: 'ENOTFOUND',\n  code: 'ENOTFOUND',\n  syscall: 'getaddrinfo',\n  hostname: '[XXXX]',\n  host: '[XXXX]',\n  port: 31182,\n  trace:\n   [ { method: 'GET',\n       url:\n        'http://[XXXX]:31182/auth/realms/bntv/.well-known/openid-configuration' } ],\n  isBoom: true,\n  isServer: true,\n  data: null,\n  output:\n   { statusCode: 502,\n     payload:\n      { message:\n         'Client request error: getaddrinfo ENOTFOUND [XXXX] [XXXX]:31182',\n        statusCode: 502,\n        error: 'Bad Gateway' },\n     headers: {} } }"}

With DNS and ipv4 it will work fine, only getting error with ipv6

Below are the configurations done for keycloak

Please help me to resolve this issue,

Hey @vivek

I noticed it states bad gateway in you logs. By chance have you tried testing you IPv6 configuration?

dig -6 TXT +short
## OR ##

You mentioned that you DNS server & IPv4 works did you check the PTR record on the DNS server for IPv6? An A or AAAA record, meaning whether it points to IPv6 or IPv4 addresses respectively.