Skip to content

A piece of middleware that uses Cloudflare's HTTP/2 Push to push static media to the clients.

License

Notifications You must be signed in to change notification settings

elcodo/django-cloudflare-push

 
 

Repository files navigation

django-cloudflare-push

About

django-cloudflare-push is a small piece of middleware that looks at the list of static files in each page that is requested (you need to be using some sort of static files processor, like Django's built-in one), and adds a Link header that CloudFlare uses to push the static files to the browser before the latter requests them, using HTTP/2 Push.

PyPI version

Installing django-cloudflare-push

  • Install django-cloudflare-push using pip: pip install django-cloudflare-push

  • Add tokenauth to your authentication backends:

MIDDLEWARE = (
    'django_cloudflare_push.middleware.push_middleware',
    ...
)

Done! Your static media will be pushed. You can test the middleware by looking for the Link header.

License

This software is distributed under the BSD license.

About

A piece of middleware that uses Cloudflare's HTTP/2 Push to push static media to the clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%