Created
December 2, 2020 20:15
-
-
Save ColinFay/102bde7e86d1223c0135f5c1d8dfd8de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui <- fluidPage() | |
server <- function(input, output, session) { | |
} | |
# Creating the shiny object | |
res <- shinyApp(ui, server) | |
# Altering the httpHandler | |
res$httpHandler <- function(req){ | |
# getting shiny:::httpResponse | |
httpResponse <- getFromNamespace("httpResponse", "shiny") | |
# Doing a 301 redirect | |
return(httpResponse( | |
status = 301, | |
headers = list( | |
Location = "https://colinfay.me" | |
) | |
)) | |
} | |
# Run the app | |
print(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment