Hello, I'm trying to support a global URL prefix for my app, so that all URLs have a prefix like /myapp if needed.
If the prefix is enabled, I'm setting the publisher signature to something like: myapp/bowerstatic
If there is no prefix enabled the signature is just bowerstatic.
So when I do this, my URLs to bower resources are getting generated correctly, but the publisher tween fails to recognize and serve them. The problem appears to be that in publisher.py at line 22 it calls request.path_info_peek. This only returns the first component of the URL, so it only returns myapp when my prefix is enabled. This fails to match the publisher signature of myapp\bowerstatic so it fails to serve the file.
It would be nice if it could recognize a multi-part signature is in use and match the whole thing. I could work up a pull request.
The app is a mixture of Pyramid and a custom/legacy framework, but in theory that shouldn't matter here.
Hello, I'm trying to support a global URL prefix for my app, so that all URLs have a prefix like
/myapp
if needed.If the prefix is enabled, I'm setting the publisher signature to something like:
myapp/bowerstatic
If there is no prefix enabled the signature is justbowerstatic
.So when I do this, my URLs to bower resources are getting generated correctly, but the publisher tween fails to recognize and serve them. The problem appears to be that in publisher.py at line 22 it calls
request.path_info_peek
. This only returns the first component of the URL, so it only returnsmyapp
when my prefix is enabled. This fails to match the publisher signature ofmyapp\bowerstatic
so it fails to serve the file.It would be nice if it could recognize a multi-part signature is in use and match the whole thing. I could work up a pull request.
The app is a mixture of Pyramid and a custom/legacy framework, but in theory that shouldn't matter here.