laurengarcia / url-metadata

NPM module: Request a url and scrape the metadata from its HTML using Node.js or the browser.
https://www.npmjs.com/package/url-metadata
MIT License
166 stars 44 forks source link

CORS Origin Error #35

Closed Codemaine closed 1 year ago

Codemaine commented 3 years ago

access to fetch at url from origin 'http://localhost:19006' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

bilalrashid300 commented 3 years ago

@Codemaine did you find a solution for this? same problem here.

ilhamgunawan commented 3 years ago

@bilalrashid300 i tried to fetch from node environtment and it works fine.

laurengarcia commented 1 year ago

The newest version 3.0.1 contains an option to set custom fetch API mode. Default is cors but can be overridden as no-cors, same-origin, etc.

https://www.npmjs.com/package/url-metadata

faithandjs commented 4 months ago

I tried the 3 modes, it gave different errors, no metadata

The newest version 3.0.1 contains an option to set custom fetch API mode. Default is cors but can be overridden as no-cors, same-origin, etc.

https://www.npmjs.com/package/url-metadata

laurengarcia commented 4 months ago

Seems to work for everyone else. Without additional context (url, error message) this is impossible to troubleshoot.