Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
CORS error when working with Reddit JSON API

So I'm currently working on a simple React app that makes fetch requests to the reddit JSON api (e.g. https://reddit.com/r/popular.json). In development I used the cors-anywhere demo, as for some reason I believed that the CORS errors wouldn't show up in production.

After doing some research on what CORS actually is, my understanding is that these errors are due to the Reddit JSON api not allowing requests from my domain. However, I've seen relatively recent videos of people making similar apps with no CORS problems mentioned, so I was wondering if anybody experienced with the Reddit APIs could help me figure out the easiest fix for here. My understanding is that the most foolproof method is to set up my own node server to make the request and then return it to my app with the proper CORS headers. But then I would have to host the server, let alone learn how to write it, which is not ideal. I was hoping there's an easier fix like adding my domain name to a whitelist on Reddit, or switching to the regular api instead of the JSON one. Let me know if there's anything I can do! Thanks.

btw, the app is hosted here: https://moburu.github.io/simplereddit

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

reddit.com doesn't set CORS headers. Try api.reddit.com.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!