Преглед на файлове

fix(googlereader): apply configured user agent in quickadd handler

The /reader/api/0/subscription/quickadd endpoint was creating its
request builder without calling WithUserAgent, so outbound feed
fetches used Go's default user agent (Go-http-client/2.x) instead
of the operator-configured HTTP_CLIENT_USER_AGENT.

Sites like Reddit that block Go's default user agent would return
403, causing quickadd to fail even though adding the same feed via
the Miniflux web UI succeeded (the UI's subscription handler correctly
sets the configured user agent).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jiasen преди 4 месеца
родител
ревизия
350df63d99
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      internal/googlereader/handler.go

+ 1 - 0
internal/googlereader/handler.go

@@ -345,6 +345,7 @@ func (h *greaderHandler) quickAddHandler(w http.ResponseWriter, r *http.Request)
 	requestBuilder := fetcher.NewRequestBuilder()
 	requestBuilder.WithTimeout(config.Opts.HTTPClientTimeout())
 	requestBuilder.WithProxyRotator(proxyrotator.ProxyRotatorInstance)
+	requestBuilder.WithUserAgent("", config.Opts.HTTPClientUserAgent())
 
 	var rssBridgeURL string
 	var rssBridgeToken string