eclipse-ee4j / eclipse-ee4j/tyrus

Origin header for WebSocket Upgrade request always starts with "http"

Open
#723 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
128
Forks
49
PR merge metrics
No merged PRs in 30d

Description

I am getting a 403 Forbidden response during WebSocket Upgrade request when connecting to a server via HTTPS (instead of 101).
The reason is a wrong "Origin" header. The header is set in method

`org.glassfish.tyrus.core.Handshake.updateHostAndOrigin(final UpgradeRequest upgradeRequest)`.

The Origin header is always set to scheme "http" no matter which scheme was used originally:

`requestHeaders.put(UpgradeRequest.ORIGIN_HEADER, Collections.singletonList("http://" + host));`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.