Access to XMLHttpRequest at ' ...' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request

 facing this issue to fatcing allowance from 1 inch aggregator ..how to resolve this ??

localhost/:1 Access to XMLHttpRequest at โ€˜https://api.1inch.io/v5.0/1/approve/allowance?tokenAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&walletAddress=0x65f399024fa90b6561b82398354fAA9Ad453dd90โ€™ from origin โ€˜http://localhost:3000โ€™ has been blocked by CORS policy: Response to preflight request doesnโ€™t pass access control check: Redirect is not allowed for a preflight request.
api.1inch.io/v5.0/1/approve/allowance?tokenAddress=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&walletAddress=0x65f399024fa90b6561b82398354fAA9Ad453dd90:1 Failed to load resource: net::ERR_FAILED
xhr.js:154

how to solve this

1 Like

Hi @blocki

Was your code working before?

I think 1inch API has updated their endpoints, so error could be related to that.

1 Like

Hello! im making this to following this.

Have a look at the below post. Apparently 1Inch has made some changes to their API endpoints.