title: React-router-redux and redux-saga CORS request issue
body: <p>I'm trying to implement authentication in a new React app based on Core UI, whereas I have an old functional version using another theme in Angular 5.</p>
  
  <p>I tried to follow <a href="https://medium.com/@stepankuzmin/authentication-with-react-router-redux-5-x-and-redux-saga-55da66b54be7" rel="nofollow noreferrer">this</a> tutorial, but it gaves me this error: </p>
  
  <blockquote>
    <p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading
    the remote resource at <a href="https://myapp.url" rel="nofollow noreferrer">https://myapp.url</a> (Reason: CORS header
    ‘Access-Control-Allow-Origin’ missing).</p>
  </blockquote>
  
  <p>every time I'm trying to login (whereas the same backend was working with Angular).</p>
  
  <p>My Backend configuration is the following:</p>
  
  <pre><code>Origins:         "*",
  Methods:         "GET, PUT, POST, DELETE",
  RequestHeaders:  "Origin, Authorization, Content-Type, X-Requested-With, Accept, Token",
  ExposedHeaders:  "",
  </code></pre>
  
  <p>and my Saga.js source is:import { call, put, takeLatest } from 'redux-saga/effects';</p>
  
  <pre><code>import { AUTH_REQUEST, AUTH_SUCCESS, AUTH_FAILURE } from './reducer';
  
  const fetchJSON = (url, options = {}) =&gt;
    new Promise((resolve, reject) =&gt; {
      return fetch(url, options)
        .then(response =&gt; (response.status !== 200 ? reject(response) : response))
        .then(response =&gt; response.json())
        .then(response =&gt; resolve(response))
        .catch(error =&gt; reject(error));
    });
  
  function* authorize({ payload: { login, password } }) {
    const options = {
      body: JSON.stringify({ login, password }),
      method: 'POST',
      headers: {  'Content-Type': 'application/json' ,
                  'Access-Control-Allow-Origin': '*',
                  'Access-Control-Allow-Headers' : 'Origin, Content-Type,  X-Requested-With, Accept'}
    };
  
    try {
      //TODO: replace URL by a dynamic one
      console.log(options.headers);
      const { token } = yield call(fetchJSON, 'https://myapp.url', options);
      yield put({ type: AUTH_SUCCESS, payload: token });
      localStorage.setItem('token', token);
    } catch (error) {
      let message;
      switch (error.status) {
        case 500: message = 'Internal Server Error'; break;
        case 401: message = 'Invalid credentials'; break;
        default: message = 'Something went wrong';
      }
      yield put({ type: AUTH_FAILURE, payload: message });
      localStorage.removeItem('token');
    }
  }
  
  function* Saga() {
    yield takeLatest(AUTH_REQUEST, authorize);
  }
  
  export default Saga;
  </code></pre>
  
  <p>When I look at my backend logs, I just receive an OPTION Rest request, without any POST.</p>
  
  <p>Do you have any idea on how to fix this?
  Thank you</p>