pull down to refresh
@k00b @sox, FYI, SN is now checking user agents. Is this intended, or is it a bug? I couldn’t find the code that enforces this.
$ curl -X POST 'https://stacker.news/api/graphql' -H 'Content-Type: application/json' -d '{"query": "query items { items(limit: 1) { items { id } } }"}' <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> </body> </html>
$ curl -X POST 'https://stacker.news/api/graphql' -H 'Content-Type: application/json' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) Chrome/120.0' -d '{"query": "query items { items(limit: 1) { items { id } } }"}' {"data":{"items":{"items":[{"id":"1452733"}]}}}
I switched on a WAF rule last night because we've been getting hammered by low quality crawlers. The rules may be too broad.
No worries, just wanted to let you know
I already updated @nitter
@k00b @sox, FYI, SN is now checking user agents. Is this intended, or is it a bug? I couldn’t find the code that enforces this.
$ curl -X POST 'https://stacker.news/api/graphql' -H 'Content-Type: application/json' -d '{"query": "query items { items(limit: 1) { items { id } } }"}' <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> </body> </html>$ curl -X POST 'https://stacker.news/api/graphql' -H 'Content-Type: application/json' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) Chrome/120.0' -d '{"query": "query items { items(limit: 1) { items { id } } }"}' {"data":{"items":{"items":[{"id":"1452733"}]}}}