According to the docs, transformHeaders should provide the path parameter when invoked, however it is not currently passed (only the header values array is passed).
transformHeaders: (headers, path) => headers,
The path is required for special case handling of headers during transformation and the parameters should match the docs.