root_static mapped to CDN

31 views
Skip to first unread message

App Jar

unread,
Jan 6, 2021, 12:35:45 AM1/6/21
to web2py-users
Is there a way to map root_static files like /favicon.ico to get served from an external CDN URL rather than /static without modifying gluon/rewrite.py?

Instead of serving form myapp/static/favicon.ico

I want to serve it from:

https://mys3bucket/static/favicon.ico

When deploying to a AWS Lambda our static files are all in an S3 bucket, but /favicon.ico is still being served from the app which invokes a (slow) new Lambda instance to server that one file.

Thanks
Reply all
Reply to author
Forward
0 new messages