openstreetmap / operations

OSMF Operations Working Group issue tracking
https://operations.osmfoundation.org/
99 stars 12 forks source link

Ariel imagery from aerial.openstreetmap.org.za has duplicate access-control-allow-origin headers #1094

Closed jontyms closed 5 months ago

jontyms commented 5 months ago

I was doing some editing in https://rapideditor.org/ and noticed tiles from aerial.openstreetmap.org.za were giving cors errors.

Access to image at 'https://aerial.openstreetmap.org.za/ngi-aerial/15/18116/19716.jpg' from origin 'https://rapideditor.org' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values ', ', but only one is allowed.

To replicate curl -v https://aerial.openstreetmap.org.za/ngi-aerial/20/579722/630911.jpg --output test.jpeg and note the duplicate headers

< server: nginx
< date: Fri, 07 Jun 2024 18:02:22 GMT
< content-type: image/jpeg
< content-length: 5387
< access-control-allow-origin: *
< access-control-allow-credentials: true
< cache-control: max-age=604800
< expires: Fri, 14 Jun 2024 18:02:22 GMT
< cache-control: stale-while-revalidate=604800, stale-if-error=604800
< x-cache-status: HIT
< access-control-allow-origin: *
Firefishy commented 5 months ago

I'll fix it shortly.

Firefishy commented 5 months ago

Fixed in https://github.com/openstreetmap/chef/commit/286f134943376ccf73e8f9593f52861afc5b1b81 and https://github.com/openstreetmap/chef/commit/1b01da2fb319333c92b7135f79825aef3754945d