Closed jcheng5 closed 3 years ago
document.domain = document.domain
will prolly have to be visited in the future when compatibility support is removed. Hopefully we catch/fix it first before everyone gets hosed.
https://developer.mozilla.org/en-US/docs/Web/API/Document/domain
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
This upgrades our SockJS client from a copy-and-pasted copy of SockJS 0.3.4, to a proper Node dependency version of v1.5.0. Among other benefits, I'll know when new versions of the sockjs-client are released, and any security vulnerabilities will be flagged.
The user-visible changes are limited to support for the new transports
eventsource
andhtmlfile
, which were introduced into the UI by shiny-server-client 1.2.0 but not actually supported by Shiny Server until now AFAIK. The new protocols will automatically be disabled if the older protocolsiframe-eventsource
andiframe-htmlfile
, respectively, are disabled (bydisable_protocols
). This is to prevent breaking existing installations of Shiny Server that disable "everything but X".Also, note that
htmlfile
doesn't work unless the Shiny app contains the line<script>document.domain = document.domain;</script>
. I don't fully understand this but it seems to be a bad idea, maybe just pretend that protocol doesn't exist.Testing notes
eventsource
andhtmlfile
appear in the protocol chooser UI and can be enabled.eventsource
works (I knowhtmlfile
doesn't work, see note aboutdocument.domain
above).disable_protocols streaming;
disables botheventsource
andhtmlfile
.disable_protocols iframe-eventsource;
disableseventsource
.disable_protocols iframe-htmlfile;
disableshtmlfile
.