Skip to content

Fix display of static images without CORS headers - #1841

Merged
jamesmisson merged 3 commits into
UniversalViewer:release-4.4.3from
jamesmisson:cors-fix
Aug 19, 2026
Merged

Fix display of static images without CORS headers#1841
jamesmisson merged 3 commits into
UniversalViewer:release-4.4.3from
jamesmisson:cors-fix

Conversation

@jamesmisson

@jamesmisson jamesmisson commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

With the update to OSD 6, UV defaults to using WebGL as the drawer for images. For WebGL to work, crossOriginPolicy in the OSD viewer options must be Anonymous. But this means that static images without CORS headers don't get loaded.

So this PR keeps the Anonymous policy as the default, while specifying false for images that don't have an image service attached to them (using the existing branches for such images). In such cases, OSD 6 will fallback to using canvas as the drawer (this is what happens when the drawer option is set to auto).

Manifests for testing:

@jamesmisson
jamesmisson requested a review from demiankatz August 18, 2026 09:46
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

@github-actions[bot] is attempting to deploy a commit to the Universal Viewer Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
universalviewer Ready Ready Preview Aug 18, 2026 9:47am

Request Review

@kirschbombe kirschbombe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally and this appears to fix the CORS issue with images where this is no image service.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks straightforward to me. Thanks, @jamesmisson and @kirschbombe!

@jamesmisson

Copy link
Copy Markdown
Contributor Author

Thank you both - I'll merge.

@jamesmisson
jamesmisson merged commit 7853437 into UniversalViewer:release-4.4.3 Aug 19, 2026
4 of 5 checks passed
Saira-A pushed a commit to Saira-A/universalviewer that referenced this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants