crossOrigin in 1.4.20


We’ve just purchased a license for GoJS and in the process of installing the licensed version have moved from 1.4.13 to 1.4.20. This has led to an issue with some of our images no longer appearing. The images are picked up from another application on our server. Looking at the Fiddler requests for the images, Chrome no longer passes the authentication cookies required when requesting the images so gets redirected to a login page and hence no images appear.

I note from the release notes that there have been some changes to the use of crossOrigin, could this be causing the issue? Could you advise how I can revert this back to the old behaviour if possible?

In your templates, for the Pictures, add the property:

sourceCrossOrigin: function() { return null; }

Does that change anything?

the sourceCrossOrigin is a (hidden) function that sets the value for image.crossOrigin, which is null by default, but we have recently decided to try and be “smart” about its value to allow more crossOrigin scenarios to work by default.

Let me know the results.

That did the trick, all images back in place. Thanks for that

Could you tell us more about the conditions that caused Pictures to stop working for you? We’d like to be certain we’re doing everything right here inside of GoJS.

You can email us, gojs (at)

I was using something like this to construct my image URLs, I’m guessing GoJS thinks it’s on a different domain?

return string.Concat(HttpContext.Current.Request.ApplicationPath, "/../", helper.ViewContext.RouteData.Values["library"],

Hmm, yeah. Can you give me an example of what a resulting URI looks like?

ie that might be: “/somesite/…/somevalue/Library/”

Yes, it will look just like that. We could be cleverer and use a relative path, which I guess wouldn’t cause the issue?