RStudio being used in an iframe cannot open new project due to the use of sandbox element.

Goal: To allow users to open an RStudio project from the file section of the dashboard while preventing users with the ability to download files directly onto their local machine.

Background: My work has a digital research environment, we have a commercial license with RStudio to use their app on our platform.

This is implemented through the use of an iframe. And due to security reasons, we can not allow users to download files directly from RStudio to their computer, so a sandbox has been put in place to prohibit downloads.

What we have tried: We have tried to remove all restrictions within the sandbox, and the issue is still there. The only thing that allows users to open a project is by removing the sandbox, and we don't want to do that due to the download issue.

With the sandbox in place, RStudio will hang on 'Switching to project /project_name...' until the page is refreshed, then it opens. There is similar behavior when opening new projects.

The error in the console when trying to open a project is attached.


If you have a commercial license, you can tell RStudio itself to prevent file downloads, using allow-file-downloads=0 in rserver.conf. More info here:

If that doesn't do the job for you, as a commercial license holder I'd recommend asking our support team about this:

Thank you for supporting RStudio!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.