score:11

you just cannot override cors check from the client side. just cannot. cors is security feature and there would be no sense if it were possible just to disable it.

there are different approaches.

  1. depending on your words

    i say it's simple api call because there is no authentication needed and i can do it in python very simply.

    i believe you just need to ensure no extra headers are send so request would become simple in meaning of cors. across axios site i've found several ways to drop any extra headers for specific request:

    a. either by specifying headers explicitly

    b. or by creating different axios instance that you will not provide with authorization header or whatever force cors to be run

  2. making proxy to be run on your domain

  3. making backend to whitelist you domain with listing it in access-control-allow- origin response header

Related Query

More Query from same tag