title: Axios : Request header field Access-Control-Allow-Methods is not allowed by Access-Control-Allow-Headers in preflight respones
body: <p>I'm trying to send a POST request from  onesignal api</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>axios({
    method: 'post',
    url: 'https://onesignal.com/api/v1/notifications',
    headers: {
      'Authorization': 'Basic NTRjZDY1O....',
      'Content-type': 'application/json; charset=utf-8',
      'Access-Control-Allow-Origin':'*',
      'Access-Control-Allow-Methods': 'POST',
      'Access-Control-Allow-Headers':'*',
      'cache-control': 'no-cache'
    },
    data: {
      "app_id": "8e86143e-00.......",
      "contents": {
        "en": "test api"
      },
      "included_segments": [
        "All"
      ]
    }
  }).catch(function (error) {
    if (error.response) {
      console.log('error-response-data-'+error.response.data);
      console.log('error-response-status-'+error.response.status);
      console.log('error-response-headers-'+error.response.headers);
    } else if (error.request) {
      console.log('error-request-'+error.request);
    } else {
      console.log('Error', error.message);
    }
  });
  </code></pre>
  
  <p><strong>ERROR OUTPUT</strong></p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="https://onesignal.com/api/v1/notifications" rel="nofollow noreferrer">https://onesignal.com/api/v1/notifications</a>
    Request header field Access-Control-Request-Methods is not allowed by
    Access-Control-Allow-Headers in preflight response</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/VKXTF.png" rel="nofollow noreferrer">error log</a></p>
  
  <p>Would fix it,but it didn't. Does anyone have any information on this error and/or how I can fix it?<br>
  <strong>i'm using firebase hosting</strong> </p>