code: function validCorsPreflight(request) {
    if (request.method === 'OPTIONS' && request.headers.has('access-control-request-headers')) {
      return request.headers.get('access-control-request-headers').split(',').map(function (header) {
        return header.trim();
      }).includes('authorization');
    } else {
      return false;
    }
  }
docs: Checks if an OPTIONS request with the access-control-request-headers containing authorization is being made
  @param request
  @returns {boolean}