flyerhq / flutter_link_previewer

Customizable link and URL preview extracted from the provided text with the ability to render from the cache. Ideal for chat applications.
MIT License
72 stars 75 forks source link

web cors error #46

Closed goodmirow-1 closed 1 year ago

goodmirow-1 commented 1 year ago

Hello, I am using this sdk very well.

However, due to the cors policy, related data cannot be received normally on the web.

In nginx, the error "No 'Access-Control-Allow-Origin' header is present on the requested resource.", even though the 'Access-Control-Allow-Origin' command allows the cors.

I tried to resolve it using the coursesProxy parameter and header parameter provided by sdk, but I don't know how to use it for normal use.

Are there any good examples?

demchenkoalex commented 1 year ago

Hi @goodmirow-1 no, not really. CORS is CORS, nothing we can do on a web from the frontend.. I have read about proxies hence added some fields, but free ones I tried never worked for me. For previews to work on web, they should be parsed on a backend (like https://www.linkpreview.net or something) and not on frontend.