Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
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 Respuestas
Responde la pregunta

0

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

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda