Question

I got a shiny https server running, and I tried to use rCharts to plot a dTable so that I could do multi-column sort from dataTables (see https://stackoverflow.com/a/20956772/719016).

What I could deduct from the Console output and this explanation (http://yoast.com/wordpress-ssl-setup/) is that this rCharts table is trying to load fonts from fonts.googleapis.com via the templates/default.html in shiny:

[blocked] The page at 'https://my.server.com/shiny/shiny_dev/' was loaded over HTTPS, but ran insecure content from 'http://fonts.googleapis.com/css?family=Source+Code+Pro': this content should also be loaded over HTTPS.

Any ideas how to fix this without admin access to the shiny server?

Can I override the fonts that are attempted to be loaded in my server.R or ui.R code?

Was it helpful?

Solution

You can try manually loading font over https, which Google Fonts also supports.

 ui = bootstrapPage(
    tags$link(
      rel = "stylesheet", 
      href="https://fonts.googleapis.com/css?family=Source+Code+Pro"
    ),
    tags$style("h1{font-family: 'Source Code Pro'}"),
    tags$h1("Test Font"),
    numericInput('n', 'Number of obs', 100),
    plotOutput('plot')
  )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top