Can't find assets (404 error) in playframework 2.6.6

106 Views Asked by At

I've recently found that I can no longer access static assets in my 2.6.6 playframework web application. As far as I can tell, I'm doing things in a fairly conventional way:

  • The assets are in project_root/public on the filesystem.
  • My routes file contains the line GET /assets/*file controllers.Assets.at(file: String)
  • My application.conf file contains the entry
play.assets {
  path = "/public"
  urlPrefix = "/assets"
}

So, I expect

https://my-domain.com/assets/dirname/filename.html

to give me the static html file at application_root/public/dirname/filename.html (I have static content living alongside templated content for reasons that are immaterial).

However, instead I get a 404 error. I expect I'm doing something foolish, but at a loss for what that is. In case it's relevant, I'm using sbt version 1.3.13, and again play 2.6.6. Things were working fine w/play 2.5, and I thought I'd migrated correctly but evidently not.

0

There are 0 best solutions below