{"id":13813611,"url":"https://github.com/skorokithakis/django-cloudflare-push","last_synced_at":"2026-04-02T02:05:22.513Z","repository":{"id":22518773,"uuid":"96585403","full_name":"skorokithakis/django-cloudflare-push","owner":"skorokithakis","description":"A piece of middleware that uses Cloudflare's HTTP/2 Push to push static media to the clients. ⛺","archived":false,"fork":false,"pushed_at":"2025-06-25T22:47:19.000Z","size":33,"stargazers_count":75,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-27T17:25:45.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skorokithakis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-08T00:19:53.000Z","updated_at":"2025-06-25T22:47:24.000Z","dependencies_parsed_at":"2025-08-17T01:09:54.447Z","dependency_job_id":"71a57f7d-5524-4d74-9782-59745f16635f","html_url":"https://github.com/skorokithakis/django-cloudflare-push","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/skorokithakis/django-cloudflare-push","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorokithakis%2Fdjango-cloudflare-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorokithakis%2Fdjango-cloudflare-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorokithakis%2Fdjango-cloudflare-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorokithakis%2Fdjango-cloudflare-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skorokithakis","download_url":"https://codeload.github.com/skorokithakis/django-cloudflare-push/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorokithakis%2Fdjango-cloudflare-push/sbom","scorecard":{"id":213822,"data":{"date":"2025-08-04","repo":{"name":"github.com/skorokithakis/django-cloudflare-push","commit":"fcfcfc57826ecb87b9f138fd882cfb361047d850"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 5/19 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:14:35.053Z","repository_id":22518773,"created_at":"2025-08-17T01:14:35.053Z","updated_at":"2025-08-17T01:14:35.053Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:01:23.135Z","updated_at":"2026-04-02T02:05:22.494Z","avatar_url":"https://github.com/skorokithakis.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"django-cloudflare-push\n======================\n\nAbout\n-----\n\ndjango-cloudflare-push is a small piece of middleware that looks at the list of\nstatic files in each page that is requested (you need to be using some sort of\nstatic files processor, like Django's built-in one), and [adds a Link\nheader](https://www.cloudflare.com/website-optimization/http2/serverpush/) that\nCloudFlare uses to push the static files to the browser before the latter\nrequests them, using HTTP/2 Push.\n\nSomewhat counter-intuitively, django-cloudflare-push is compatible with *any*\nprovider that supports HTTP/2 Push using Link headers, which is pretty much\nmost of them. For example, the Caddy webserver supports this with the `push`\ndirective, and this library will work just fine with that.\n\n[![PyPI version](https://img.shields.io/pypi/v/django-cloudflare-push.svg)](https://pypi.python.org/pypi/django-cloudflare-push)\n\n\n\nInstalling django-cloudflare-push\n---------------------------------\n\n* Install django-cloudflare-push using pip: `pip install django-cloudflare-push`\n\n* Add the middleware to your MIDDLEWARE setting:\n\n```python\nMIDDLEWARE = (\n    'django_cloudflare_push.middleware.push_middleware',\n    ...\n)\n```\n\nDone! Your static media will be pushed. You can test the middleware by looking\nfor the `Link` header.\n\nSettings\n--------\n\n```python\nCLOUDFLARE_PUSH_FILTER = lambda file: True\n```\n\nAllows you to customize what files will be sent to the client to be preloaded.\nThis setting should be set to a callable, which accepts a single parameter\n(the name of the file to preload). By default, `django-cloudflare-push` pushes\nall static files.\n\nFor instance, to push _only_ static CSS and JavaScript files:\n\n```python\nCLOUDFLARE_PUSH_FILTER = lambda x: x.endswith('.css') or x.endswith('.js')\n```\nWhen using with it with Django \u003e= 5.1 you migth need to set\n```python\nsettings.STORAGES[\"staticfiles\"][\"BACKEND\"]\n```\ninstead of \n```python\nsettings.STATICFILES_STORAGE\n```\n\nWebserver configuration\n-----------------------\n\nHere's how to configure various webservers to work well with\n`django-cloudflare-push`:\n\n### nginx\n\nIf you're running nginx v1.13.9 or later, you can just include the\n`http2_push_preload on` directive in your configuration:\n\n```\nserver {\n    ...\n    http2_push_preload on;\n    ...\n}\n```\n\n### Caddy\n\nWith Caddy, you can use the [`push` directive](https://caddyserver.com/docs/push):\n\n```\npush\n```\n\n...I know.\n\nLicense\n-------\n\nThis software is distributed under the BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskorokithakis%2Fdjango-cloudflare-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskorokithakis%2Fdjango-cloudflare-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskorokithakis%2Fdjango-cloudflare-push/lists"}