Running into CORS issue with the OPTIONS request


Can someone review the code below to see what I'm doing wrong? The problem is that when I make a GET call to find the entries of a headword, the browser treats it as a preflight CORS request, and introduces a OPTIONS call before the GET call, without passing any of the authentication parameters. Because it can't get past the OPTIONS request, the GET request is never made.

In the test case shown below, I use the standard Fetch API ( Specifically, the OPTIONS call fails because of the "Authentication parameters missing" 403 error.

  fetch("", {
    method: "GET",
    mode: "cors",
    cache: "no-cache",
    credentials: "include",
    headers: {
      "Content-Type": "application/json",
      "Accept": "application/json",
      "api_id": "<my_api_id>",
      "api_key": "<my_api_key>"
    redirect: "follow", // manual, *follow, error
    referrer: "no-referrer"
  .then(function (response) {
  .catch(function (error) {



Sign In or Register to comment.