0

I have an R Shiny dashboard deployed to shinyapps.io which produces a URL of the following structure https://<account-name>.shinyapps.io/<application-name>/ .

My dashboard behaves as expected with regards to all code including referenced JavaScript and CSS files, when visited using this URL.

I have set up a custom domain with a neater URL which points to the longer shinyapps generated one.

Oddly, when navigating to the dashboard via this custom domain, my website’s style is affected. The scroll bar disappears completely. When checking the source code of both URLs (longer shinyapps generated and shorter custom domain), it seems that additional styling is imposed by the custom domain and overflow: hidden; is added among other things.

**My question is: ** can a domain used to navigate to a website alter the style sheet of that website?

My two assumptions (so far) are:

  1. Something to do with dns propagation?

This custom domain was pointing at an older version of the dashboard which I made some packages changes on. Could there be some leftover conflicting styles applied that will sort themselves out?

  1. Is there some way of adding and removing style sheets from a domain itself on the Cloudflare side. Perhaps I can remove this?

Thanks!

BilboBaagins
  • 66
  • 1
  • 4
  • Are you using an `iframe` tag to diplay your app? – ismirsehregal Oct 11 '22 at 11:11
  • I'm not purposefully using an `iframe` to display it however when I check source code of the app that I navigated to via custom domain I can see that, yes it looks like the app is being displayed via an `iframe`. `
    ` This is different to what is presented in the source code when visiting the app directly via the longer shinyapps URL.
    – BilboBaagins Oct 11 '22 at 12:26
  • Accordingly the visual differences you noted will be caused by the [attributes](https://www.w3schools.com/tags/tag_iframe.ASP) of that `iframe`. You'll need to adapt them to your needs, however it's almost impossible to help without a proper description of your setup and/or a reproducible example. Regarding your initial question: usually the style of your shiny app can't be modified by another website - please see [this](https://stackoverflow.com/a/6494783/9841389) related discussion - it would need to be explicitly allowed. – ismirsehregal Oct 11 '22 at 14:22

0 Answers0