Skip to content

Commit

Permalink
Add assets to API
Browse files Browse the repository at this point in the history
  • Loading branch information
wkmor1 committed Sep 9, 2024
1 parent 15277a8 commit 3724805
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion api.R
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ function(pr) {
spec[[c("paths", "/healthz")]] <- NULL
spec[[c("paths", "/job")]] <- NULL
spec[[c("paths", "/")]] <- NULL

spec[[c("paths", "/favicon.ico")]] <- NULL
spec[[c("paths", "/robots.txt")]] <- NULL

spec

Expand Down Expand Up @@ -371,6 +372,22 @@ function(res) {

}

#* @get /favicon.ico
#* @serializer contentType list(type="image/x-icon")
function() {

readBin("www/favicon.ico", "raw", n = file.info("www/favicon.ico")$size)

}

#* @get /robots.txt
#* @serializer contentType list(type="text/plain")
function() {

readBin("robots.txt", "raw", n = file.info("robots.txt")$size)

}

#* @assets ./www/
list()

Expand Down

0 comments on commit 3724805

Please sign in to comment.