SOME-1HING / google-reverse-image-api

This is a simple API built using Node.js and Express.js that allows you to perform Google Reverse Image Search by providing an image URL. The API uses Cheerio to scrap Google's image search engine's html to get result text and similar images url.
https://google-reverse-image-api.vercel.app
MIT License
62 stars 18 forks source link

CORS error when accessing the endpoint from the browser #3

Open HovSyan opened 2 months ago

HovSyan commented 2 months ago

On a preflight call from the browser the OPTIONS call returns no CORS Allow headers, and as other applications runs in a different origin, the browser doesn't allow the api call to succeed.

Can we handle this and add Access-Control-Allow-Origin, Access-Control-Allow-Methods and Access-Control-Allow-Headers headers to the OPTIONS call response.

I am not very good at Express and Node, but I guess it must be some sort of configurable option in the server config.

Thanks!

Andarina commented 3 weeks ago

Samhe I was in my account effect personal I enviros

1

2

2 git_commit