com-lihaoyi / cask

Cask: a Scala HTTP micro-framework. Cask makes it easy to set up a website, backend server, or REST API using Scala
https://com-lihaoyi.github.io/cask/
Other
525 stars 55 forks source link

options wildcard interferes with staticFiles #119

Closed gabrieljones closed 1 month ago

gabrieljones commented 6 months ago

I have

  @cask.staticResources("/static")
  def staticResourceRoutes() = "static"

when I add an options for all paths the static route above breaks

  @cask.options("/")
  def options(segments: cask.RemainingPathSegments): Unit = {
    cask.Response("", statusCode = 200, headers = Seq("Access-Control-Allow-Origin" -> "*"))
  }
lihaoyi commented 1 month ago

Should be fixed by https://github.com/com-lihaoyi/mainargs/issues/89 I think?