Embedding apps into website

Issue posted on Github here: https://github.com/openanalytics/shinyproxy/issues/5

I would like to embed my shiny apps running on shinyproxy into a website running out of a different server. I’ve tried using iframes, but shinyproxy seems to have its ‘X-Frame-Options’ value set to ‘SAMEORIGIN’, with no obvious way to change it in order to allow for connections from my web server.

Thanks @sjmgarnier! Let us know whether the fix we released in version 0.7.8 works for you.

Testing it now. Will tell you in a few minutes.

It works! Thanks! This will be very useful.

Brilliant! Thanks for the feedback!

For more advanced embedding of Shiny apps in websites or larger applications, there is now (with ShinyProxy 2.0.0) a dedicated API to manage proxies; see https://www.shinyproxy.io/configuration/#proxy-api

1 Like

Hi,
We can’t access the link https://www.shinyproxy.io/configuration/#proxy-api anymore. I don’t remember how to use the API, and cannot find documentation about it.

Hi @KZARCA,

Sorry, we switched from swagger to raml, but the new html docs aren’t online yet.
For the time being, you can check this URL:
http://htmlpreview.github.io/?https://github.com/openanalytics/containerproxy/blob/develop/doc/api/containerproxy-rest.html

1 Like

@KZARCA we updated the website and revived the https://www.shinyproxy.io/configuration/#proxy-api section.

1 Like

I’ve managed to review the api endpoint documentation. Could you please provide some context on how this [API] would work in practice? For example, I have a website built in django with tiles that point to different applications. It would be nice to have one of those tiles point to a docker application that shinyproxy will launch (example: proxyspecid=execdash). Should clicking the tile make a post request to the /proxy/execdash endpoint to launch a docker container? If so, upon sending the request, should I capture the proxy id from the response, and then have the tile point to a page that renders shinyproxyhost:port/endpoint/proxy-id inside an iframe? Thanks for getting the API out, I’d just like to understand how to make best use of your endpoints.

Hi @AlephNull, anything new on how to embed it on a website inside an iframe ?
Thanks

@dickoah No, unfortunately not. Still awaiting response from @fmichielssen or someone else at open analytics on how to use their API. I’m pretty ignorant on how to best leverage their api and I find the documentation pretty bare-bones. If you figure anything out or have any ideas, please let me know.

Thanks

Thanks, I will continue to dig and I will keep you posted if I find a way to do that.

Hi @AlephNull, @dickoah,

An example has been published here: https://github.com/openanalytics/shinyproxy-config-examples/tree/master/07-api-embedded-app

In short, the intention is indeed to make a POST request to /api/proxy and extract the endpoint from the returned JSON.

If you have questions, ideas or remarks regarding this example, please share them on the shinyproxy-config-examples repo.

1 Like

Hi,
is there any tutorial/guide that provides information on how to integrate a Shiny App hosted with ShinyProxy (in my case on an AWS EC2 instance) into another website via an iframe? Could not find any related content besides this thread.
Thank you and best,
Tobias