Member-only story

Retrieving all request headers in Shiny web applications

Marian C.
4 min readOct 10, 2021

--

By default open source Shiny server does not pass the request headers to R scripts.

What is Shiny and how request headers could be useful I explained in my previous post. If you need to access request headers in a Shiny application you have two options:

  • to buy Shiny Server Professional
  • to spend several minutes on upgrading free open source Shiny Server

This post is about the cheapest and fastest option — to spent less time than you would spend on paying the bill.

To demonstrate that there are no tricks, let’s start from scratch.

I use a new CentOS 7 virtual machine.

To install a Shiny server I follow the official guide https://www.rstudio.com/products/shiny/download-server/redhat-centos/. I do not need to execute more than the three commands listed in the installation guide:

sudo yum install Rsudo su - \
-c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
wget https://download3.rstudio.org/centos7/x86_64/shiny-server-1.5.16.958-x86_64.rpm
sudo yum install --nogpgcheck shiny-server-1.5.16.958-x86_64.rpm

--

--

Marian C.
Marian C.

Written by Marian C.

Java, JavaScript and SQL developer. Interested in data collection and visualization.

Responses (1)