rstudio/plumber

@filter cors for DELETE

Open

#409 opened on Apr 3, 2019

View on GitHub
 (4 comments) (2 reactions) (0 assignees)R (1,437 stars) (257 forks)batch import
difficulty: noviceeffort: mediumhelp wanted

Description

The filter mentioned in #143 works for GET requests, but is not active for DELETE. When I convert my DELETE to a (misnomed) GET, everything is fine.

#* @filter cors
cors <- function(res) {
  res$setHeader("Access-Control-Allow-Origin", "*")
  plumber::forward()
}

Contributor guide