.dds files (environment textures for BabylonJS) are served with the wrong mime type

Hello there.

BabylonJS uses .dds files as environment skybox textures.
Serving from localhost or other webserver, dds file works.

While loading from Cloudfare Pages I get this error:
“Invalid magic number in DDS header”, which means it is served with the wrong mime-type.

I am not an http wizard, but loading it from local server or other resources I get this (everything works):
(sorry about the ugly paste, as a new user I can only post one image)

|Access-Control-Allow-Origin||
|Connection|keep-alive|
|Date|Fri, 10 Dec 2021 16:54:39 GMT|
|Keep-Alive|timeout=5|
|Accept|
/*|
|Accept-Encoding|gzip, deflate|
|Accept-Language|en-GB,en;q=0.5|
|Connection|keep-alive|
|Host|localhost:3000|
|If-Modified-Since|Fri, 03 Dec 2021 15:03:48 GMT|
|If-None-Match|W/“1048736-1638543828278”|
|Referer|http://localhost:3000/|
|Sec-Fetch-Dest|empty|
|Sec-Fetch-Mode|cors|
|Sec-Fetch-Site|same-origin|
|User-Agent|Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0|

While from Cloudfare Pages I get this (and the DDS is not recognized):
image

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.