File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,15 +142,14 @@ func StartAPIServer(
142142 if config .Timeout > 0 {
143143 router .Use (middleware .HandleAPITimeout (time .Duration (config .Timeout ) * time .Millisecond ))
144144 }
145-
146145 router .Use (handlers .CompressHandler )
147- router .Use (handlers .CORS (
146+
147+ handler := handlers .CORS (
148148 handlers .AllowedOrigins (origins ),
149149 handlers .AllowedHeaders ([]string {"content-type" , "x-genesis-id" }),
150150 handlers .ExposedHeaders ([]string {"x-genesis-id" , "x-thorest-ver" }),
151- ))
152-
153- srv := & http.Server {Handler : router , ReadHeaderTimeout : time .Second , ReadTimeout : 5 * time .Second }
151+ )(router )
152+ srv := & http.Server {Handler : handler , ReadHeaderTimeout : time .Second , ReadTimeout : 5 * time .Second }
154153 var goes co.Goes
155154 goes .Go (func () {
156155 srv .Serve (listener )
Original file line number Diff line number Diff line change @@ -65,4 +65,4 @@ require (
6565
6666replace github.com/syndtr/goleveldb => github.com/vechain/goleveldb v1.0.1-0.20220809091043-51eb019c8655
6767
68- replace github.com/ethereum/go-ethereum => github.com/vechain/go-ethereum v1.8.15-0.20250203151135-b4d97bda6bc9
68+ replace github.com/ethereum/go-ethereum => github.com/vechain/go-ethereum v1.8.15-0.20250708104014-34fea45fc2b7
Original file line number Diff line number Diff line change @@ -156,8 +156,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
156156github.com/stretchr/testify v1.10.0 /go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY =
157157github.com/vechain/go-ecvrf v0.0.0-20220525125849-96fa0442e765 h1:jvr+TSivjObZmOKVdqlgeLtRhaDG27gE39PMuE2IJ24 =
158158github.com/vechain/go-ecvrf v0.0.0-20220525125849-96fa0442e765 /go.mod h1:cwnTMgAVzMb30xMKnGI1LdU1NjMiPllYb7i3ibj/fzE =
159- github.com/vechain/go-ethereum v1.8.15-0.20250203151135-b4d97bda6bc9 h1:dkF3gD0LQPAD3ajR5XEtddDN0ffLZwflgRt6YKe5Deg =
160- github.com/vechain/go-ethereum v1.8.15-0.20250203151135-b4d97bda6bc9 /go.mod h1:yPUCNmntAh1PritrMfSi7noK+9vVPStZX3wgh3ieaY0 =
159+ github.com/vechain/go-ethereum v1.8.15-0.20250708104014-34fea45fc2b7 h1:G+L5+ucSFFgEb8eCbfHtJ1kEZFC9zuLYITnjH2F8zJ0 =
160+ github.com/vechain/go-ethereum v1.8.15-0.20250708104014-34fea45fc2b7 /go.mod h1:yPUCNmntAh1PritrMfSi7noK+9vVPStZX3wgh3ieaY0 =
161161github.com/vechain/goleveldb v1.0.1-0.20220809091043-51eb019c8655 h1:CbHcWpCi7wOYfpoErRABh3Slyq9vO0Ay/EHN5GuJSXQ =
162162github.com/vechain/goleveldb v1.0.1-0.20220809091043-51eb019c8655 /go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48 =
163163github.com/yuin/goldmark v1.2.1 /go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74 =
You can’t perform that action at this time.
0 commit comments