mapbox / mapbox.js

Mapbox JavaScript API, a Leaflet Plugin
mapbox.com/mapbox.js/
Other
1.91k stars 386 forks source link

Static Tiles API 403 Error on Chrome #1343

Closed UnderJollyRoger closed 3 years ago

UnderJollyRoger commented 3 years ago

This app works fine on Firefox and IE, but not with Chrome. I have a valid access token. https://underjollyroger.github.io/EarlyIllinoisLandcover/#9/41.5764/-88.0609 When you zoom in to view the tiles Chrome gives me a 403 Forbidden error.

**General**
Request URL: https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/15/8370/12216?access_token=pk.eyJ1IjoiamVua2tpIiwiYSI6ImNraGlseDI5aDFwY2oycHQ5dm8zZjJ6ODEifQ.wQNDqZbxUFYU8l6s7hYvWw
Request Method: GET
Status Code: 403 Forbidden
Remote Address: 13.226.22.172:443
Referrer Policy: strict-origin-when-cross-origin

**Response Headers**
Access-Control-Allow-Methods: GET
Access-Control-Allow-Origin: *
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 23
Content-Type: application/json; charset=utf-8
Date: Wed, 25 Nov 2020 20:29:53 GMT
ETag: W/"17-bqIm6pxC4cx+ZoszvXxsClwgWw8"
Via: 1.1 7da0231bd1c514f0dd4d36905f23fd73.cloudfront.net (CloudFront)
X-Amz-Cf-Id: cdyewxG2-laqpSs8AwVzfellSDyCAJQTyeKR4ygltGoD7dTxUuK3tA==
X-Amz-Cf-Pop: ORD51-C2
X-Cache: Error from cloudfront
X-Content-Type-Options: nosniff
X-Powered-By: Express

**Request Headers**
Accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Host: api.mapbox.com
Referer: https://underjollyroger.github.io/
Sec-Fetch-Dest: image
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36

**Query String Parameters**
access_token: pk.eyJ1IjoiamVua2tpIiwiYSI6ImNraGlseDI5aDFwY2oycHQ5dm8zZjJ6ODEifQ.wQNDqZbxUFYU8l6s7hYvWw
riastrad commented 3 years ago

Thank you for using Mapbox! This troubleshooting guide might be handy for your implementation. https://docs.mapbox.com/help/troubleshooting/cors-errors/.

Please note that this repository's issues are used for reporting bugs and requesting features for Mapbox.js. For general how-to questions like this, we recommend contacting Mapbox Support or asking on Stack Overflow.

UnderJollyRoger commented 3 years ago

Thanks, I had a post on Stack Exchange about this: https://gis.stackexchange.com/questions/379787/mapbox-tiles-not-showing-on-leaflet-map-using-google-chrome/379796?noredirect=1#comment621689_379796

I'll have to contact Mapbox support.