Hello,
I have an issue with MP4 videos on my website: they can’t be played on Apple devices.
This has been reported here: MP4 Won't Load in Safari Using CloudFlare but there is no real fix.
I noticed that 2 headers are missing when Cloudflare is used.
Without CF:
stanislas@mbp ~/mstdn> curl -I https://media.mstdn.io/mstdn-media/media_attachments/files/003/417/987/original/5690303f4c5f9449.mp4
HTTP/2 200
server: nginx
date: Sat, 27 Oct 2018 14:19:13 GMT
content-type: video/mp4
content-length: 101615
vary: Accept-Encoding
cache-control: max-age=315576000
etag: "80fa46b3e2c68e316756b4625fdec0f1"
last-modified: Sat, 27 Oct 2018 09:55:53 GMT
x-amz-id-2: E/qOA6K8T8g2De6lYWIqUtKrlCHJd5ICCVXIS3zZBl7BwEq5b51urgpH7XXGgoSnlcDZFMsW5qBE
x-amz-request-id: 3CAD47C4796E33AE
x-cached: HIT
accept-ranges: bytes
With CF:
stanislas@mbp ~/mstdn> curl -I https://media.mstdn.io/mstdn-media/media_attachments/files/003/417/987/original/5690303f4c5f9449.mp4
HTTP/2 200
date: Sat, 27 Oct 2018 14:14:05 GMT
content-type: video/mp4
set-cookie: __cfduid=d22694f13bb7b7b1f9de3a6221689ab431540649645; expires=Sun, 27-Oct-19 14:14:05 GMT; path=/; domain=.mstdn.io; HttpOnly; Secure
vary: Accept-Encoding
cache-control: max-age=315576000
etag: W/"80fa46b3e2c68e316756b4625fdec0f1"
last-modified: Sat, 27 Oct 2018 09:55:53 GMT
x-amz-id-2: E/qOA6K8T8g2De6lYWIqUtKrlCHJd5ICCVXIS3zZBl7BwEq5b51urgpH7XXGgoSnlcDZFMsW5qBE
x-amz-request-id: 3CAD47C4796E33AE
x-cached: HIT
strict-transport-security: max-age=15552000; includeSubDomains; preload
x-content-type-options: nosniff
expect-ct: max-age=604800, report-uri="https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct"
server: Cloudflare
cf-ray: 4705c45c2b6c3bb1-CDG
content-length
and accept-ranges
are missing. I assume this is why I have issues in Safari.
This has been reported 2 times already:
But no solution either.
I found websites behing CF where these 2 headers are forwarded, so I wonder what can I do to fix that. I tried bypassing the cache but it didn’t change anything.