Skip to content

A self-hosted dashboard that puts all your feeds in one place

Add user agent to test reddit request

Svilen Markov14a21de37fe1
diff --git a/internal/glance/diagnose.go b/internal/glance/diagnose.go
index 7978699..2839a23 100644
--- a/internal/glance/diagnose.go
+++ b/internal/glance/diagnose.go
@@ -75,7 +75,9 @@ var diagnosticSteps = []diagnosticStep{
{
name: "fetch data from Reddit API",
fn: func() (string, error) {
- return testHttpRequest("GET", "https://www.reddit.com/search.json", 200)
+ return testHttpRequestWithHeaders("GET", "https://www.reddit.com/search.json", map[string]string{
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0",
+ }, 200)
},
},
{