I embedded a Shiny application with an iframe in my website, and I am now trying to protect my Shiny application : I want the iframe to be reachable only in my website, 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 that, I am trying to get the URL of the parent which contains the iframe inside of my Shiny-app, and block it whether it's not the good website.
The problem is : I found how to get the URL parent in many languages but R. Does anyone know how I could do it ?
I had another possible solution, which doesn't work for the moment :
postForm('http://url.php', .params = params, curl = curl, style="POST")
I thought I could send a post variable from my website to my R application, like a key, to give the access only to the websites who know the key. But I can't make it work.
EDIT : I think this question is different from the link suggested in the comments. Indeed, the suggested option doesn't seem to be usable in R Shiny.