Setting <public-root> in appengine-web.xml does not work
sanderploegsma opened this issue · comments
According to the appengine-web.xml documentation it should be possible to set a root path for static files like this:
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<!-- ... -->
<public-root>/static</public-root>
</appengine-web-app>
Which should make src/main/webapp/style.css
available under project.appspot.com/static/style.css
.
However, when I add the public-root
setting, the resulting app.yaml
does not have any directives for static files anymore, and the build/staged-app/__static__
folder is suddenly empty.
Am I missing something?
@ludoch @eamonnmcmanus any ideas?
from @ludoch
I think this is Work as intended. The customer has to put files under the static dir, and then the mapping works this work:
for a file under customerstatic/foo
, it is served underproject.appspot.com/foo
Right, reading the documentation again it seems I mixed up the file path and the URL path. You're correct, the public-root
is used to denote the folder which contains the static files.
I was trying to do the inverse: prepend something to the URL path of static files, due to migrating an application and having to proxy specific paths from the old application. I therefore wanted to have my static files served under: example.com/some/path/style.css
, without having to create the /some/path
directory structure in my new application. From the looks of it, this isn't currently possible.
close as not planned