Skip to content

Commit 14a21de

Browse files
committed
Add user agent to test reddit request
1 parent d9239ac commit 14a21de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/glance/diagnose.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ var diagnosticSteps = []diagnosticStep{
7575
{
7676
name: "fetch data from Reddit API",
7777
fn: func() (string, error) {
78-
return testHttpRequest("GET", "https://www.reddit.com/search.json", 200)
78+
return testHttpRequestWithHeaders("GET", "https://www.reddit.com/search.json", map[string]string{
79+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0",
80+
}, 200)
7981
},
8082
},
8183
{

0 commit comments

Comments
 (0)