Skip to content

Commit

Permalink
Update news
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 30, 2025
1 parent ea335f1 commit 7b7773d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Added `asset_route()` for high performance serving of static files
* Fixed a bug that would case keys to be lower cased when provided by the
handler (#16)
* The file system path in `ressource_route()` is no longer expected to be
absolute (#18)
* The Content-Type header is now set correctly when serving the default file in
`ressource_route()` (#19)

# routr 0.4.1

Expand Down
2 changes: 1 addition & 1 deletion R/ressource_route.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ ressource_route <- function(..., default_file = 'index.html', default_ext = 'htm
}

complete_paths <- function(paths) {
paths <- ifelse(grepl('^/', paths) | .Platform$OS.type == "windows", paths, paste0('/', paths))
paths <- ifelse(grepl('^/', paths), paths, paste0('/', paths))
ifelse(grepl('/$', paths), paths, paste0(paths, '/'))
}

0 comments on commit 7b7773d

Please sign in to comment.