Range requests in pdf.js used in R Shiny

From what I've read, pdf.js has the ability to make range requests for pdf content on the server so the user doesn't have to wait for the entire pdf file to be downloaded before he can view it. In order to support this, the server must support range requests i.e while making a request to server the header Accept-ranges: bytes should be present in response.

How do I enable this in R Shiny? I am struggling to get this in place and there doesn't seem to be any documentation on how to enable this specifically for R shiny.