search-satellite-imagery icon indicating copy to clipboard operation
search-satellite-imagery copied to clipboard

Check CORS error on tiles fetch

Open jo-chemla opened this issue 2 years ago • 2 comments

Can be modified via the transformRequest function, eg on this link

Goal is to remove the need for an Allow-CORS plugin.

Code-sample from the doc:

// Use `transformRequest` to modify requests that begin with `http://myHost`.
transformRequest: (url, resourceType) => {
  if (resourceType === 'Source' && url.startsWith('http://myHost')) {
    return {
      url: url.replace('http', 'https'),
      headers: {'my-custom-header': true},
      credentials: 'include'  // Include cookies for cross-origin requests
    };
  }
}

jo-chemla avatar Aug 02 '23 15:08 jo-chemla

hi @jo-chemla I'd like to work on this issue if no one is working on it . Thankyou.

Riya922003 avatar Oct 30 '25 15:10 Riya922003

Hi there, you sure can, are you familiar with the project and have you successfully deployed it/used it locally? This is not necessarily the most easy nor important issue, you could look into https://github.com/Iconem/search-satellite-imagery/issues/11 or https://github.com/Iconem/search-satellite-imagery/issues/16 instead if you want to tackle a more interesting one!

Also, this repo is far more manageable if you would like to give it a go! historical-satellite good-first-issues

jo-chemla avatar Oct 30 '25 16:10 jo-chemla