Embedding apps into website


#1

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.


#2

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


#3

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


#4

It works! Thanks! This will be very useful.


#5

Brilliant! Thanks for the feedback!


#6

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


#7

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.


#8

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


#9

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


#10

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.


#11

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


#12

@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


#13

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


#14

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.