Closed SteveAyre closed 7 years ago
@tgoodlet poke
Currently the code looks for the sip_h_X- prefix 'in' name, if that is true it'll use the key as the variable name otherwise add the sip_h_X- prefix.
Perhaps it would be better to test name.startswith('siph') instead (which is more generic, correct and faster)? If that's not set add the sip_h_X- prefix as now. That should be backwards compatible but allow setting any header name with the siph prefix in the key.
Raised pull request https://github.com/sangoma/switchy/pull/67
@SteveAyre great idea. We should probably even just get rid of the sip_h_X
case eventually - expect the user to be explicit about using an x header.
Closed with #67, no?
set_orig_cmd accepts a dict of xheaders. However it adds the X- prefix. This means it cannot set other headers such as P-Served-User (this gets sent as X-P-Served-User) or headers without any prefix.