Pannellum: Add option for setting `crossOrigin` to `use-credentials`

Created on 7 Dec 2017  路  3Comments  路  Source: mpetroff/pannellum

I'm loading multires tiles inside a web application from the same origin over a proxy (Load balancer). This works for Chrome, Internet Explorer, Edge and Firefox, but not for Safari (Desktop and Mobile). All browsers except Safari send their cookies in the header file (Which is needed for validating the session).

Changing crossOrigin="anonymous" to crossOrigin="use-credentials" in pannellum solved this issue for Safari. Would it be possible to make this the new default crossOrigin behavior for fetching tiles?

Thanks!

enhancement

Most helpful comment

I added a crossOrigin configuration parameter in 2de1706be087930fb0e7cf6f13026e5dcd87aba5.

All 3 comments

Setting crossOrigin to use-credentials sends extra data that is unnecessary in the vast majority of cases, increasing bandwidth usage, so I'm not going to change the default. It might be possible to add an option, though.

Setting it as an option in the config.json would be a nice workaround (Default could still be crossOrigin set to anonymous). I already got it to work with the manual change, but that's always a dangerous game with future framework updates.

In any case, appreciating your work, the viewer works great :)

I added a crossOrigin configuration parameter in 2de1706be087930fb0e7cf6f13026e5dcd87aba5.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valeriodeluca picture valeriodeluca  路  3Comments

mikeMikeymike picture mikeMikeymike  路  8Comments

DStillingfleet picture DStillingfleet  路  8Comments

ThunderBoltEngineer picture ThunderBoltEngineer  路  3Comments

shtrudelsupport picture shtrudelsupport  路  3Comments