I'm using standalone wiremock and I'm creating a proxy mapping. The proxy target requires bearer authentication and the token expires every 5 minute. I don't want to use the static value of the token inside the proxy mapping because it would require to change it every 5 minutes, what I want to do is to proxy the Authorization header as well. What I'm trying is:
{
"priority": 10,
"request": {
"method": "GET",
"urlPattern": "/path/.*"
},
"response": {
"proxyBaseUrl": "https://myBaseUrl.com",
"additionalProxyRequestHeaders": {
"Authorization": "{{request.headers.Authorization[0]}}"
},
"transformers": ["response-template"]
}
}
but the header is not proxied. Do you know how to solve this issue?