I have enabled the Shiny application with an iframe on my website, and now I am trying to protect my Shiny application: I want the iframe to be available only on my website, and not directly with its URL.
<iframe name="rshiny" src="http://url-of-my-shiny-app/" style="border: none; width: 100%;height:800px;"> </iframe>
To do this, I am trying to get the URL of the parent that contains the iframe inside my Shiny application and block it if it is a good website.
The problem is this: I found how to get the parent URL in many languages, but R. Does anyone know how I can do this?
I had another possible solution that is currently not working:
postForm('http://url.php', .params = params, curl = curl, style="POST")
I thought I could send the post variable from my site to my R application, for example a key, to allow access only to those websites that know the key. But I canβt make it work.
EDIT: I think this question is different from the link provided in the comments. Indeed, the proposed option does not seem to be applicable in R Shiny.
source share