{"id":42682598,"url":"https://github.com/renthraysk/cbsr","last_synced_at":"2026-01-29T11:55:08.470Z","repository":{"id":44520985,"uuid":"512307990","full_name":"renthraysk/cbsr","owner":"renthraysk","description":"Serving immutable HTTP sub resources from embed.FS using cache busting urls.","archived":false,"fork":false,"pushed_at":"2025-09-28T11:04:41.000Z","size":60,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T13:07:20.520Z","etag":null,"topics":["cachebusting","subresources"],"latest_commit_sha":null,"homepage":"","language":"Go","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/renthraysk.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":"2022-07-09T23:52:36.000Z","updated_at":"2025-09-28T11:04:44.000Z","dependencies_parsed_at":"2022-09-26T21:30:35.762Z","dependency_job_id":null,"html_url":"https://github.com/renthraysk/cbsr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renthraysk/cbsr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renthraysk%2Fcbsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renthraysk%2Fcbsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renthraysk%2Fcbsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renthraysk%2Fcbsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renthraysk","download_url":"https://codeload.github.com/renthraysk/cbsr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renthraysk%2Fcbsr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28876862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cachebusting","subresources"],"created_at":"2026-01-29T11:55:08.028Z","updated_at":"2026-01-29T11:55:08.455Z","avatar_url":"https://github.com/renthraysk.png","language":"Go","readme":"# CBSR\n\nServing immutable HTTP sub resources from embed.FS using cache busting urls.\n\n## Encoding content negotation\n\nIf multiple encoded versions exist in the embeded file system, eg.\n\n- ``js/default.js.gz``\n- ``js/default.js.br``\n- ``js/default.js``\n\nthis will perform negotiation per request, between the 3 encodings.\n\nIt is server driven content negotation. It ignores user agent q values, unless they are 0.\nThe encoding that has the smallest size that the user agent supports is what is sent.\nIf two encodings share the same size, then identity, gzip, brotli is this order of preference.\n\n## Cache busting URLs\n\nA hash is inserted into the base name (filename without any encoding filename extension).\n\t\nSo the 3 files in example above will be negotated between from a single ``http.Handler`` registered with ``http.ServeMux`` with a pattern of \"``js/default.\u003chash\u003e.js``\".\n\nThe hash is derived by hashing over each variant response (http header \u0026 bodies) in ascending size. So any change in any response, or relative ordering should generate a new hash, and therefore cause user agents to fetch the most up to date version.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenthraysk%2Fcbsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenthraysk%2Fcbsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenthraysk%2Fcbsr/lists"}