AtlasOfLivingAustralia / image-service

Image repository and tiling services
https://images.ala.org.au
0 stars 17 forks source link

Sound files displaying error message #109

Open nickdos opened 4 years ago

nickdos commented 4 years ago

@nickdos commented on Tue Aug 27 2019

E.g. Cockatoo page: https://bie.ala.org.au/species/urn:lsid:biodiversity.org.au:afd.taxon:f9eb417b-2de3-48ac-ba4e-1d438f0cb323

image

Happens on my machine on Safari but not Chrome. Happens on Chrome on PC. Doesn't seems to matter if you are logged in or not.

Also happens on image-service - https://images.ala.org.au/image/5fc2a0d5-0162-474a-bbba-fb9df94b49d5.

Safari request for the raw file (https://images.ala.org.au/image/proxyImage?imageId=5fc2a0d5-0162-474a-bbba-fb9df94b49d5) shows headers:

:status: 200
X-Content-Type-Options: nosniff
Content-Type: image/jpeg
Content-Security-Policy: upgrade-insecure-requests
Date: Mon, 25 Nov 2019 00:09:29 GMT
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=31536000
Server: nginx/1.17.6
x-application-context: application:production

The nosniff option could be a potential cause.


@nickdos commented on Mon Nov 25 2019

Note this also happens on the new image-service page:

https://images.ala.org.au/image/5fc2a0d5-0162-474a-bbba-fb9df94b49d5 (using Safari).

This appears to be described here https://github.com/kolber/audiojs/issues/241 but is not fixed.

Seeing as that repo has not been updated for a while, it might need a change to a different JS audio player.

nickdos commented 4 years ago

I think this might be due to the wrong content-type: Content-Type: image/jpeg.

Try adding a check in the code for the file type and sending the appropriate content-type.