Create Call Rest is missing target headers on outdial (#874)

* add target headers for rest create-call

* rebased

---------

Co-authored-by: ajukes <ajukes@callable.io>
This commit is contained in:
Antony Jukes
2024-09-02 21:48:09 +01:00
committed by GitHub
parent d365883bfe
commit 4348615b75

View File

@@ -97,7 +97,8 @@ router.post('/',
'X-Trace-ID': rootSpan.traceId,
...(req.body?.application_sid && {'X-Application-Sid': req.body.application_sid}),
...(restDial.fromHost && {'X-Preferred-From-Host': restDial.fromHost}),
...(record_all_calls && {'X-Record-All-Calls': recordOutputFormat})
...(record_all_calls && {'X-Record-All-Calls': recordOutputFormat}),
...target.headers
};
switch (target.type) {