You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following route for static files (yes, copied from the example!):
@cask.staticFiles("/static/file", headers = Seq("Cache-Control" -> "max-age=31536000"))
def staticFileRoutes(): String =
val r = Constants.outputDirectory
println(s"JLX: static folder returned: '$r'.")
r
When I use an output directory name (value of "Constants.outputDirectory" above) starting with one or multiple '/', the Cask framework strips the leading '/', resulting in a file not found error.
It took me a long time to figure out what was the error. I found it using strace, which shows clearly that the file that the web server tries to open does not start with the '/' character.
I have the following route for static files (yes, copied from the example!):
When I use an output directory name (value of "Constants.outputDirectory" above) starting with one or multiple '/', the Cask framework strips the leading '/', resulting in a file not found error.
It took me a long time to figure out what was the error. I found it using strace, which shows clearly that the file that the web server tries to open does not start with the '/' character.
strace output:
Thank you.
The text was updated successfully, but these errors were encountered: