I think this should be just handshakeData instead of handshakeData.headers, as later in the code this is passed to requestMW as a handshake object.So current implementation will end up accessing handshakeData.headers.headers