MCPcopy
hub / github.com/autobrr/qui / ServeHTTP

Method ServeHTTP

internal/proxy/handler.go:144–147  ·  view source on GitHub ↗

ServeHTTP handles the reverse proxy request (fallback for non-intercepted routes)

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

142
143// ServeHTTP handles the reverse proxy request (fallback for non-intercepted routes)
144func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
145 log.Debug().Msg("Forwarding to qBittorrent via reverse proxy")
146 h.proxy.ServeHTTP(w, r)
147}
148
149// rewriteRequest modifies the outbound request to target the correct qBittorrent instance
150func (h *Handler) rewriteRequest(pr *httputil.ProxyRequest) {

Callers 15

validateQueryParamsMethod · 0.95
NewMetricsServerFunction · 0.80
ClientAPIKeyMiddlewareFunction · 0.80
handleSyncMainDataMethod · 0.80
handleTorrentPeersMethod · 0.80
handleSetLocationMethod · 0.80
handleReannounceMethod · 0.80
handleRenameFileMethod · 0.80
handleRenameFolderMethod · 0.80
handleDeleteTorrentsMethod · 0.80
HandlerMethod · 0.80

Calls

no outgoing calls