mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #1620] Support setting the Sec-WebSocket-Protocol header on WebSocket connections #512
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#512
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @oshoham on GitHub (Apr 27, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1620
Is your feature request related to a problem? Please describe.
I sometimes use the
Sec-WebSocket-Protocolheader to authenticate WebSocket endpoints, and I think it'd be great if Hoppscotch supported setting that particular header on WebSocket connections.I'm aware of the existing discussions around setting headers on WebSocket connections and that that's not likely to happen, but
Sec-WebSocket-Protocolis the only header that the browser WebSocket API explicitly allows programmers to set (via the 2nd argument to the WebSocket constructor).Please consider making an exception for this particular header, as I think that it merits being considered separately from the question of whether to allow setting arbitrary headers on WebSocket connections.
Describe the solution you'd like
I'd like to see an additional field in the WebSocket pane that allows the user to input a value for the
Sec-WebSocket-Protocolheader to be set on the WebSocket connection when it is established.Describe alternatives you've considered
I'm aware that there are other approaches to authenticating WebSocket connections, e.g. using a query parameter, but
Sec-WebSocket-Protocolis a widely-supported part of the browser WebSocket API.@liyasthomas commented on GitHub (Apr 28, 2021):
Will look into this.
@liyasthomas commented on GitHub (Jun 15, 2021):
Hoppscotch now supports
Sec-WebSocket-Protocolheaders on WebSocket connections.