mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-29 03:00:45 -04:00
add reactlog resource path when calling for reactlog
This commit is contained in:
@@ -22,6 +22,14 @@ reactLogHandler <- function(req) {
|
||||
))
|
||||
|
||||
} else if (identical(req$PATH_INFO, "/reactlog")){
|
||||
|
||||
if (!hasResourcePath("reactlogAsset")) {
|
||||
addResourcePath(
|
||||
"reactlogAsset",
|
||||
system.file("reactlogAsset", package = "shinyreactlog")
|
||||
)
|
||||
}
|
||||
|
||||
sessionToken <- parseQueryString(req$QUERY_STRING)$s
|
||||
|
||||
return(httpResponse(
|
||||
|
||||
@@ -72,6 +72,10 @@ addResourcePath <- function(prefix, directoryPath) {
|
||||
)
|
||||
}
|
||||
|
||||
hasResourcePath <- function(prefix) {
|
||||
!is.null(.globals$resources[[prefix]])
|
||||
}
|
||||
|
||||
resourcePathHandler <- function(req) {
|
||||
if (!identical(req$REQUEST_METHOD, 'GET'))
|
||||
return(NULL)
|
||||
|
||||
Reference in New Issue
Block a user