{"id":26981160,"url":"https://github.com/acearchive/api-worker","last_synced_at":"2025-04-03T15:33:08.108Z","repository":{"id":64419648,"uuid":"545319272","full_name":"acearchive/api-worker","owner":"acearchive","description":"A serverless function which handles API requests for Ace Archive","archived":false,"fork":false,"pushed_at":"2025-02-27T07:37:35.000Z","size":522,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T10:27:47.589Z","etag":null,"topics":["cloudflare-workers","rest-api","serverless"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/acearchive.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-04T06:46:17.000Z","updated_at":"2025-02-27T07:37:38.000Z","dependencies_parsed_at":"2023-02-09T16:00:52.285Z","dependency_job_id":"3cd99b25-235a-4a45-852a-1c102de40e90","html_url":"https://github.com/acearchive/api-worker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Fapi-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Fapi-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Fapi-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Fapi-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acearchive","download_url":"https://codeload.github.com/acearchive/api-worker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247028297,"owners_count":20871673,"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":["cloudflare-workers","rest-api","serverless"],"created_at":"2025-04-03T15:33:07.437Z","updated_at":"2025-04-03T15:33:08.097Z","avatar_url":"https://github.com/acearchive.png","language":"TypeScript","readme":"# api-worker\n\nThis repo is a [Cloudflare Worker](https://developers.cloudflare.com/workers/)\nthat serves the Ace Archive API using data from the [Cloudflare\nD1](https://developers.cloudflare.com/d1) SQLite database.\n\nSee [the website](https://acearchive.lgbt/docs/contributing/api/) for more\ninformation.\n\n## Pagination cursor encryption\n\nPagination cursors are encrypted, for a few reasons:\n\n1. We can trivially detect an invalid cursor argument without any complex logic\n   or querying the upstream data source.\n2. The contents of the cursor are opaque to the user, which prevents them from\n   trying to interpret or parse it.\n3. The cursor we return is always different for every request. This prevents the\n   user from relying on the contents of the cursor being deterministic.\n\nThe encryption key is stored in a worker secret called `CURSOR_ENCRYPTION_KEY`.\nYou can generate a key in the browser JS console like this:\n\n```javascript\nconst key = await crypto.subtle.generateKey({ name: \"AES-GCM\", length: 128 }, true, [\"encrypt\", \"decrypt\"])\nconst jwk = JSON.stringify(await crypto.subtle.exportKey(\"jwk\", key));\nconsole.log(jwk);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facearchive%2Fapi-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facearchive%2Fapi-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facearchive%2Fapi-worker/lists"}