Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.06 KB

File metadata and controls

39 lines (26 loc) · 1.06 KB

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.