{"id":22828643,"url":"https://github.com/busterc/serve-static-x","last_synced_at":"2025-04-23T16:24:47.736Z","repository":{"id":57356713,"uuid":"45799352","full_name":"busterc/serve-static-x","owner":"busterc","description":":anchor: Serve static files with cache busting capability (uses Express.static() aka serve-static)","archived":false,"fork":false,"pushed_at":"2018-08-25T21:44:36.000Z","size":7,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T16:24:44.049Z","etag":null,"topics":["caching","disk-cache","express","express-middleware"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/busterc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-08T21:12:26.000Z","updated_at":"2023-09-08T17:03:25.000Z","dependencies_parsed_at":"2022-09-05T06:51:25.223Z","dependency_job_id":null,"html_url":"https://github.com/busterc/serve-static-x","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Fserve-static-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Fserve-static-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Fserve-static-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busterc%2Fserve-static-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busterc","download_url":"https://codeload.github.com/busterc/serve-static-x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468804,"owners_count":21435541,"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":["caching","disk-cache","express","express-middleware"],"created_at":"2024-12-12T19:11:13.030Z","updated_at":"2025-04-23T16:24:47.704Z","avatar_url":"https://github.com/busterc.png","language":"JavaScript","readme":"# serve-static-x [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]\n\u003e Serve static files with cache busting capability; \n\u003e uses [`Express.static()`](http://expressjs.com/4x/api.html#express.static) aka [serve-static](https://github.com/expressjs/serve-static)\n\nUse it just like [serve-static](https://github.com/expressjs/serve-static) except now you can set an additional option named \"x\" that enables a custom (secret) request header to be used to bypass receiving static files.\n\n- Use in conjunction with [`save-static`](https://github.com/busterc/save-static) for caching and re-caching files to disk.\n\n## Install\n\n```sh\n$ npm install --save serve-static-x\n```\n\n\n## Usage\n\n```js\nvar express = require('express');\nvar serveStaticX = require('serve-static-x');\n\nvar app = express();\n\nvar staticPath = path.join(__dirname, '/static/html'); // \u003c= for example\n\n// this is where the magic happens\napp.use(serveStaticX(staticPath, {\n  x: 'x-my-secret-cache-busting-header'\n}));\n\n```\n\n## License\n\nISC © [Buster Collings](https://about.me/buster)\n\n\n[npm-image]: https://badge.fury.io/js/serve-static-x.svg\n[npm-url]: https://npmjs.org/package/serve-static-x\n[travis-image]: https://travis-ci.org/busterc/serve-static-x.svg?branch=master\n[travis-url]: https://travis-ci.org/busterc/serve-static-x\n[daviddm-image]: https://david-dm.org/busterc/serve-static-x.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/busterc/serve-static-x\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusterc%2Fserve-static-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusterc%2Fserve-static-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusterc%2Fserve-static-x/lists"}