If, like me, you use the same static files on every page, just hard code them into layout.html.
I realize this may make upgrading more, um, interesting, but it's much simpler than pattern-based routing. On Wednesday, August 13, 2014 11:23:52 AM UTC-4, Louis Amon wrote: > > I am using a CDN and am trying to configure web2py to use it instead of > the classic static file service. > > So far I've been using pattern-based routes like this : > > cdn = 'https://xxxxxxx.cloudfront.net' > > routes_in = (... > ('/static/$anything', cdn + '/static/$anything'), > ... > ) > > routes_out = (... > ('/static/$anything', cdn + '/static/$anything'), > ... > ) > > This basically works, but this has to be implemented on a pattern-based > routes.py which means I lose many cool features like map_hyphen, > default_application, default_controller mappings... > > Is there a way to use a CDN with a parametric router ? > > I read somewhere that the host parameter in URL can also be used to setup > a CDN, but it seems a bit tedious to find all URL and rewrite them. > > Isn't there a variable in gluon.rewrite that I can mess with to trick > web2py into serving CDN-based content ? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.