@@ -228,7 +228,13 @@ shinyAppDir_serverR <- function(appDir, options=list()) {
228
228
structure(
229
229
list (
230
230
staticPaths = staticPaths ,
231
- httpHandler = joinHandlers(c(uiHandler , fallbackWWWDir )),
231
+ # Even though the wwwDir is handled as a static path, we need to include
232
+ # it here to be handled by R as well. This is because the special case
233
+ # of index.html: it is specifically not handled as a staticPath for
234
+ # reasons explained above, but if someone does want to serve up an
235
+ # index.html, we need to handle it, and we do it by using the
236
+ # staticHandler in the R code path. (#2380)
237
+ httpHandler = joinHandlers(c(uiHandler , wwwDir , fallbackWWWDir )),
232
238
serverFuncSource = serverFuncSource ,
233
239
onStart = onStart ,
234
240
onStop = onStop ,
@@ -355,7 +361,13 @@ shinyAppDir_appR <- function(fileName, appDir, options=list())
355
361
# uiHandler, then falbackWWWDir (which is served up by the R
356
362
# staticHandler function).
357
363
staticPaths = staticPaths ,
358
- httpHandler = joinHandlers(c(dynHttpHandler , fallbackWWWDir )),
364
+ # Even though the wwwDir is handled as a static path, we need to include
365
+ # it here to be handled by R as well. This is because the special case
366
+ # of index.html: it is specifically not handled as a staticPath for
367
+ # reasons explained above, but if someone does want to serve up an
368
+ # index.html, we need to handle it, and we do it by using the
369
+ # staticHandler in the R code path. (#2380)
370
+ httpHandler = joinHandlers(c(dynHttpHandler , wwwDir , fallbackWWWDir )),
359
371
serverFuncSource = dynServerFuncSource ,
360
372
onStart = onStart ,
361
373
onStop = onStop ,
0 commit comments