{"id":27078981,"url":"https://github.com/netlogix/nxvarnish","last_synced_at":"2025-04-06T01:20:16.714Z","repository":{"id":52917279,"uuid":"495706906","full_name":"netlogix/nxvarnish","owner":"netlogix","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-05T16:18:53.000Z","size":86,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-05T17:28:44.940Z","etag":null,"topics":["php","typo3","varnish"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlogix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-24T07:02:37.000Z","updated_at":"2025-02-05T16:18:16.000Z","dependencies_parsed_at":"2024-12-20T14:21:37.616Z","dependency_job_id":"c493dc2a-8317-4ca0-9930-828c9cf5af42","html_url":"https://github.com/netlogix/nxvarnish","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.17391304347826086","last_synced_commit":"d2e7f2e65770320e1ddd0d9901c04ed68f6e89d4"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnxvarnish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnxvarnish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnxvarnish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnxvarnish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlogix","download_url":"https://codeload.github.com/netlogix/nxvarnish/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247421102,"owners_count":20936231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["php","typo3","varnish"],"created_at":"2025-04-06T01:20:15.879Z","updated_at":"2025-04-06T01:20:16.688Z","avatar_url":"https://github.com/netlogix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TYPO3 extension nxvarnish\n\n[![stability-stable](https://img.shields.io/badge/stability-stable-33bbff.svg)](https://github.com/netlogix/nxvarnish)\n[![TYPO3 V13](https://img.shields.io/badge/TYPO3-13-orange.svg)](https://get.typo3.org/version/13)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.3-8892BF.svg)](https://php.net/)\n[![GitHub CI status](https://github.com/netlogix/nxvarnish/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/netlogix/nxvarnish/actions)\n\nAdds varnish integration to TYPO3. Ensures varnish caches are flushed when TYPO3\ncaches are flushed. Uses cache tags to flush all necessary content.\n\n## Compatibility\n\nThe current version (6.x) of this extension has been tested using these\nversions:\n\n- TYPO3 13.4 on PHP 8.3\n- TYPO3 13.4 on PHP 8.4\n\n## Installation\n\nInstall the package via composer.\n\n```bash\ncomposer require netlogix/nxvarnish\n```\n\n## Configuration\n\n### TYPO3\n\nThis extension provides some configuration in Install Tool.\n\n- varnishHost: **required**, needed to communicate with Varnish in order to\n  purge\n  caches\n- allowCacheLogin: _optional_, send normal cache headers even when someone is\n  logged in\n\n### Varnish\n\nVarnish needs some special configuration to understand cache tags and BAN\nrequests.\nAdd this to your Varnish .vcl:\n\n```vcl\n# WARNING: this is an example how to add tag-based purging to an existing\n# Varnish configuration. This is *not* a complete configuration!\n\n# a list of clients that are allowed to initiate a BAN\nacl purge {\n      \"localhost\";\n      # add whatever IPs are allowed to initiate a BAN\n      \"172.16.0.0\"/16; # just an example\n}\n\n\nsub vcl_recv {\n\n    # ...\n\n    if (req.method == \"BAN\") {\n        # only allow cache BANs from known IPs\n        if (!std.ip(req.http.X-Client-Ip, client.ip) ~ purge) {\n            return (synth(405, \"Not allowed.\"));\n        }\n\n        # ban using cache tags\n        if (req.http.X-Cache-Tags) {\n            # this will ban all cache objects with matching tags\n            ban(\"obj.http.X-Cache-Tags ~ \" + req.http.X-Cache-Tags);\n\n            # create an HTTP 200 response and exit\n            return (synth(200, \"Ban added.\"));\n        }\n\n        # return an error if no cache tags were provided.\n        # you might need to remove this if you have additional BAN conditions\n        return (synth(400, \"Bad Request.\"));\n\n    }\n\n    # ...\n\n}\n\nsub vcl_deliver {\n    # ...\n\n    # remove cache-tags header from response sent to client\n    unset resp.http.X-Cache-Tags;\n\n\n    # ...\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnxvarnish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlogix%2Fnxvarnish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnxvarnish/lists"}