(respw http.ResponseWriter, req *http.Request)
| 221 | } |
| 222 | |
| 223 | func (s *RPCEndPointServer) HandleHTTPRequest(respw http.ResponseWriter, req *http.Request) { |
| 224 | setCorsHeaders(respw) |
| 225 | |
| 226 | if req.Method == http.MethodGet { |
| 227 | if strings.Trim(req.URL.Path, "/") == "fast" { |
| 228 | http.Redirect(respw, req, "https://docs.flashbots.net/flashbots-protect/quick-start#faster-transactions", http.StatusFound) |
| 229 | } else { |
| 230 | http.Redirect(respw, req, "https://docs.flashbots.net/flashbots-protect/rpc/quick-start/", http.StatusFound) |
| 231 | } |
| 232 | return |
| 233 | } |
| 234 | |
| 235 | if req.Method == http.MethodOptions { |
| 236 | respw.WriteHeader(http.StatusOK) |
| 237 | return |
| 238 | } |
| 239 | |
| 240 | request := NewRPCRequestHandler(s.logger, &respw, req, s.proxyURL, s.proxyTimeoutSeconds, s.relaySigningKey, s.relayURL, s.db, s.builderNameProvider.BuilderNames(), s.chainID) |
| 241 | request.process() |
| 242 | } |
| 243 | |
| 244 | func (s *RPCEndPointServer) handleDrain(respw http.ResponseWriter, req *http.Request) { |
| 245 | s.isHealthyMx.Lock() |
nothing calls this directly
no test coverage detected