title: Redux Toolkit RTK-Query Cors issue
body: <p>I'm trying to get data from the public Deezer Api located here : <a href="https://api.deezer.com/" rel="nofollow noreferrer">https://api.deezer.com/</a>.</p>
  <p>To fetch that data i'm using RTK-Query from reduxtoolkit like so (to then use it in my components using hooks i get from each endpoints) :</p>
  <pre><code>export const deezerApi = createApi({
      reducerPath: 'deezerApi',
      baseQuery: fetchBaseQuery({ baseUrl: 'https://api.deezer.com/', 
      mode: &quot;cors&quot;, ==&gt; enable cors here
      prepareHeaders: (headers) =&gt; {
        headers.set('Access-Control-Allow-Origin', '*') ==&gt; what i tried but still not working
        // headers.set('Access-Control-Allow-Methods', 'GET') //
        // headers.set('Access-Control-Allow-Headers', '*') //
        return headers
      },
    }),
      
      endpoints: (builder) =&gt; ({
  
        
        getChartArtists: builder.query({
          query: () =&gt; `chart/artists`,
        }),
  
  // More endpoints 
  
      }),
      
    })
  </code></pre>
  <p>Here is the error i get :</p>
  <blockquote>
  <p>Access to fetch at 'https://api.deezer.com/chart/albums' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: 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</p>
  </blockquote>
  <p>I get this error whether or not i add this line of code :</p>
  <pre><code>headers.set('Access-Control-Allow-Origin', '*')
  </code></pre>
  <p>When i look at the network console, it seems to be added to the header of my request...</p>
  <p><a href="https://i.stack.imgur.com/2QQOZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2QQOZ.png" alt="enter image description here" /></a></p>
  <p>Does anyone what's happening or have a solution ?</p>
  <p>Thanks for your help !</p>