Reddit Scraper Lite avatar
Reddit Scraper Lite

Pricing

Pay per event

Go to Store
Reddit Scraper Lite

Reddit Scraper Lite

Developed by

Gustavo Rudiger

Gustavo Rudiger

Maintained by Community

Pay Per Result, unlimited Reddit web scraper to crawl posts, comments, communities, and users without login. Limit web scraping by number of posts or items and extract all data in a dataset in multiple formats.

5.0 (2)

Pricing

Pay per event

142

Total users

6k

Monthly users

713

Runs succeeded

65%

Issue response

16 hours

Last modified

13 days ago

DK

CORS Error When Using API in React Application

Closed

dakster opened this issue
4 months ago

I am encountering a CORS error when trying to use the API in my React.js application.

The error message states: Access to XMLHttpRequest at 'https://api.apify.com/v2/actor-tasks/trudax/reddit-scraper-lite/runs?token=apify_api_token' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

This issue occurs when making an API call from the React frontend hosted locally on http://localhost:3000. It seems the API server does not allow requests from this origin due to CORS restrictions.

I have added the API call to my React application, but I am unable to proceed due to this error. Could you please guide me on how to resolve this or update the API to support CORS for local development?

trudax avatar

This is not an issue with the actor, so I cannot provide much guidance, but you probably need something like the /local-cors-proxy node package.