Thanks for your reply!
My project is to generate images from dall-e and make a power point presentation from those images.
When I open those generated images directly in the browser it works. But when I use ajax request to download those images it shows CORS error.
I have created an img tag and included the generated image url in the src attribute and it works fine.
You’ll probably need to download the image first (with a server side script) and rehost it somewhere else.
These cross origin resource sharing (CORS) policies are sometimes set in place to prevent exactly what you’re trying to do (embedding content directly in a website).
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.
Rather, you need to make a preflight CORS OPTIONS method http request, and obtain an “access-control-request-method” value to send as header in your actual GET that follow.
Browse like a browser. Port knock and impersonate.