model-viewer icon indicating copy to clipboard operation
model-viewer copied to clipboard

GLTF 302 Redirects not taken into account when loading assets

Open benferns opened this issue 5 years ago • 0 comments

Description

Requesting a gltf file that resolves via a 30X redirect doesn't rewrite relative asset paths to that new location, resulting in 404s.

Example:

1.gltf has image 'image.png' stored in same directory

Request: api.example.com/models/gltfs/1 Response: 302 cdn.example.com/gltfs/1.gltf

Model Viewer: 404 api.example.com/models/gltfs/image.png

Note that Scene Viewer on Android handles the redirect correctly.

Live Demo

https://glitch.com/edit/#!/join/1e825f92-f5fc-4984-909c-58d23b090db6

Version

  • model-viewer: v1.1.0

Browser Affected

  • [x] Chrome
  • [ ] Edge
  • [ ] Firefox
  • [ ] IE
  • [ ] Safari

OS

  • [ ] Android
  • [ ] iOS
  • [ ] Linux
  • [x] MacOS
  • [ ] Windows

benferns avatar Aug 27 '20 07:08 benferns