yamine 0.14.2 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/yamine/proxy.rb +8 -2
- data/lib/yamine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8af42a840ce756689e6c37140a3a8cdf402c51aa71b9819b88df624d6a6ffaae
|
|
4
|
+
data.tar.gz: 0a51ab3de0e5605ea8b5152720f76957530722a1b65740dfebc0ab29d14337f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7823296acbadf8e6cc07079ff3f2d3ad56809d2de4973e6ed821124888cd2ee2144e267a754e585454fbc5c808c23fb9984e8da9880de4fda3b2b58bfcfff65
|
|
7
|
+
data.tar.gz: 2642187bbffd601efb5272f557577014704a4415b76c45eefbfa177d3e337b62074d5b60f36525c7a25b174684af7ccc5da31bbd8abaf59a9cdfa9fb864fae96
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.14.3] — 2026-09-15
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **WebSocket upgrades carry the same forwarded headers as every other
|
|
8
|
+
request.** Upgrade requests (ActionCable, Turbo Streams over cable)
|
|
9
|
+
were piped to the backend byte-for-byte, so `X-Forwarded-Proto`,
|
|
10
|
+
`X-Forwarded-For`, and `X-Forwarded-Host` never arrived — the one
|
|
11
|
+
request class that skipped `set_forwarded`. An app behind the proxy
|
|
12
|
+
then saw a `wss://` connection as plain `http`, and Rails' ActionCable
|
|
13
|
+
origin check (Origin vs. scheme + Host) compared
|
|
14
|
+
`https://app.localhost` against `http://app.localhost` and refused the
|
|
15
|
+
socket with "Request origin not allowed". Upgrades now run the same
|
|
16
|
+
`set_forwarded` path as every other request before the head is
|
|
17
|
+
forwarded; the bytes after the header block still pipe raw.
|
|
18
|
+
|
|
3
19
|
## [0.14.2] — 2026-09-15
|
|
4
20
|
|
|
5
21
|
### Added
|
data/lib/yamine/proxy.rb
CHANGED
|
@@ -320,12 +320,18 @@ module Yamine
|
|
|
320
320
|
|
|
321
321
|
def handle_upgrade(sock, head, buf)
|
|
322
322
|
routes = cached_routes
|
|
323
|
-
|
|
323
|
+
method, target, headers = parse_head(head)
|
|
324
324
|
entry = route(headers["host"].to_s, routes)
|
|
325
325
|
return unless entry
|
|
326
326
|
|
|
327
|
+
# Upgrades carry the same forwarded headers as every other request:
|
|
328
|
+
# an app behind the proxy (ActionCable's origin check) reads the
|
|
329
|
+
# scheme from X-Forwarded-Proto, and a verbatim head would tell a
|
|
330
|
+
# wss:// connection it arrived as http.
|
|
331
|
+
set_forwarded(headers, sock, tls: @tls)
|
|
332
|
+
|
|
327
333
|
backend = dial(entry)
|
|
328
|
-
backend.write(
|
|
334
|
+
backend.write(rebuild_head(method, target, headers))
|
|
329
335
|
backend.write(buf) unless buf.empty?
|
|
330
336
|
pipe_both(sock, backend)
|
|
331
337
|
rescue SystemCallError, OpenSSL::SSL::SSLError, IOError => e
|
data/lib/yamine/version.rb
CHANGED