mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
Redirect on no trailing slash
This commit is contained in:
10
R/server.R
10
R/server.R
@@ -562,6 +562,16 @@ proxyCallbacks <- function(prefix, targetCallbacks) {
|
||||
|
||||
list(
|
||||
onHeaders = function(req) {
|
||||
if (identical(req$PATH_INFO, prefix)) {
|
||||
return(list(
|
||||
status = 302L,
|
||||
headers = list(
|
||||
"Location" = paste(prefix, "/", sep = ""),
|
||||
"Content-Type" = "text/plain"
|
||||
),
|
||||
body = ""
|
||||
))
|
||||
}
|
||||
cat("onHeaders: ", req$PATH_INFO, "\n")
|
||||
req <- matchReq(req)
|
||||
if (is.null(req))
|
||||
|
||||
Reference in New Issue
Block a user