Unable to add production environment variable in application.conf in case of mapped values

Hi Team,

Could you please help me how should I add environment variables if I need to externalize “headers” variable in below case :

my_map: [
{
url1= “https://www.google.com”,
url2 = “https://www.fb.com”,
url2 = {?URL2}, headers = { Content-Type: [ "application/json" ] } }, { url1= "https://www.google1234.com", url2 = "https://www.fb123.com", url2 = {?URL2123},
headers = {
XYZ: [
“headerSample1”
]
}
}
]

The above implementation works fine as I haven’t externalised the header in the config however, the implementation fails whenever I try to externalize the “headers” variable. I tried below combination but it’s unable to fetch the key and it’s value.

  1. headers = {
    XYZ: [
    “header1”
    ],
    Host: [
    ${?HEADER1}

    ]
    }

  2. headers = {
    XYZ: [
    “Header1”
    ]
    },
    headers = {

XYZ: [
${?HEADER1}

  ]

}

  1. headers = {
    XYZ: [
    “Header1”,
    ${?HEADER1}
    ]
    }

Can anyone please help how can I externalize the value of my Header “XYZ” in the above case?