I want to fix the error below, so I used the proxyUrl, I solved but got another error.
<code>Access to fetch at 'https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json' (redirected from 'http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json') from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
</code>
<code>Access to fetch at 'https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json' (redirected from 'http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json') from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
</code>
Access to fetch at 'https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json' (redirected from 'http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json') from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
This is the code:js code
This is the error: error
how to fix the error?
New contributor
Claire is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.