Skip to content

Add the possibility to add response header on WebSocket handshake request #692

@KaSSaaaa

Description

@KaSSaaaa

Hi,

I'm working on a small project with HTTP & WS and I chose Crow for that matter. The only thing is, I'm using a JS library for testing purposes but the WebSocket keeps closing because some headers are not available on the handshake response.

Is there any possibility to add headers to the handshake query's response ?

Otherwise, I've looked a bit into the source code and it shouldn't be too complicated to add something like an "onhandshake" method (like you have "onopen",...) which could allow the user to add the response headers on the handshake response. I would be glad to create a Pull Request with that feature if necessary.

Best regards,
Pierre

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureCode based project improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions