Commit graph

17 commits

Author SHA1 Message Date
Daniel Liu
42f49e3e20
test(node): fix flaky jwt-test #30388 (#1999)
This PR fixes a flaky jwt-test.

The test is a jwt "from one second in the future". The test passes; the
reason for this is that the CI-system is slow, and by the time the jwt
is actually evaluated, that second has passed, and it's no longer
future.

Alternative to #30380

Co-authored-by: Martin HS <martin@swende.se>
2026-02-10 16:42:20 +05:30
Daniel Liu
5199446cb6
style(node): fix typos (#1997) 2026-02-05 15:31:14 +05:30
JukLee0ira
a74b87307c
all: use strings.EqualFold for string comparison #24890 (#1134) 2025-06-23 16:00:32 +08:00
JukLee0ira
1b0420f19a
node: support expressive origin rules in ws.origins #21481 (#1128) 2025-06-23 14:47:53 +08:00
JukLee0ira
7a659c9e7d
node: change JWT error status to 401 Unauthorized #25629 (#1029) 2025-05-08 16:24:41 +08:00
Daniel Liu
d25c6f02a7
all: not copy loop var for golang v1.22 (#1020) 2025-04-29 17:27:36 +08:00
Daniel Liu
c75623ace7
rpc: add limit for batch request and response size #26681 (#998) 2025-04-28 17:00:30 +08:00
JukLee0ira
b899363d17 node: set JWT expiry to 60 seconds #25416 2025-04-28 10:25:07 +08:00
Daniel Liu
e9b0bc7d74
node: ensure resp.body closed #26969 (#987) 2025-04-28 09:12:42 +08:00
JukLee0ira
230a2f09ba
cmd/geth, node, rpc: implement jwt tokens #24364 (#993)
* cmd/geth, node, rpc: implement jwt tokens #24364

* fix
2025-04-27 18:17:09 +08:00
JukLee0ira
b4308ba733
internal/ethapi: disable sending of non eip155 replay protected tx #22339 (#971)
* internal/ethapi: disable sending of non eip155 replay protected tx #22339

* eth: optimize the initialization logic of EthAPIBackend

* fix
2025-04-25 11:55:52 +08:00
Daniel Liu
58e9b8c8f6
node, rpc: improve HTTP write timeout handling #25457 (#982)
Here we add special handling for sending an error response when the write timeout of the
HTTP server is just about to expire. This is surprisingly difficult to get right, since is
must be ensured that all output is fully flushed in time, which needs support from
multiple levels of the RPC handler stack:

The timeout response can't use chunked transfer-encoding because there is no way to write
the final terminating chunk. net/http writes it when the topmost handler returns, but the
timeout will already be over by the time that happens. We decided to disable chunked
encoding by setting content-length explicitly.

Gzip compression must also be disabled for timeout responses because we don't know the
true content-length before compressing all output, i.e. compression would reintroduce
chunked transfer-encoding.

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2025-04-25 08:01:44 +08:00
JukLee0ira
10dd75e82f
node: serve JSON-RPC on custom path prefix #22184 (#952) 2025-04-24 11:34:26 +08:00
JukLee0ira
b1e08e6642
all: refactor package node #21105 (#923) 2025-04-10 18:52:49 +08:00
Daniel Liu
d55dca04b5 all: use http package to replace http method names (26535) 2024-12-05 10:59:42 +08:00
Daniel Liu
22ad2f57ef node: fix websocket connection header check (#21646) 2024-11-13 09:35:41 +08:00
Daniel Liu
b76438aafe node: allow WebSocket and HTTP work on same port (#20810) 2024-11-13 09:35:41 +08:00