{"id":19381032,"url":"https://github.com/holidaycheck/koa-check-origin","last_synced_at":"2025-04-13T23:34:20.522Z","repository":{"id":37759238,"uuid":"154492964","full_name":"holidaycheck/koa-check-origin","owner":"holidaycheck","description":"💣 A Koa middleware that throws a HTTP 403 when the given origin does not match.","archived":false,"fork":false,"pushed_at":"2025-02-12T22:39:14.000Z","size":139,"stargazers_count":0,"open_issues_count":21,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T13:45:35.281Z","etag":null,"topics":["koa","middleware","origin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/holidaycheck.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-10-24T11:56:59.000Z","updated_at":"2018-12-14T05:05:52.000Z","dependencies_parsed_at":"2023-10-03T02:38:47.887Z","dependency_job_id":"87beedfa-1aaa-4957-8bb2-4933df17266e","html_url":"https://github.com/holidaycheck/koa-check-origin","commit_stats":{"total_commits":79,"total_committers":2,"mean_commits":39.5,"dds":0.4683544303797469,"last_synced_commit":"90ca96b9a7ee9d0ec744959a40204f9a90f82750"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holidaycheck%2Fkoa-check-origin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holidaycheck%2Fkoa-check-origin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holidaycheck%2Fkoa-check-origin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holidaycheck%2Fkoa-check-origin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holidaycheck","download_url":"https://codeload.github.com/holidaycheck/koa-check-origin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248796769,"owners_count":21163029,"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":["koa","middleware","origin"],"created_at":"2024-11-10T09:15:39.059Z","updated_at":"2025-04-13T23:34:20.486Z","avatar_url":"https://github.com/holidaycheck.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://img.shields.io/travis/holidaycheck/koa-check-origin/master.svg?style=flat)](https://travis-ci.org/holidaycheck/koa-check-origin)\n[![NPM Downloads](https://img.shields.io/npm/dm/koa-check-origin.svg?style=flat)](https://www.npmjs.org/package/koa-check-origin)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)\n[![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat)](https://gitmoji.carloscuesta.me)\n[![made-with-typescript](https://img.shields.io/badge/Made%20with-TypeScript-1f425f.svg?style=flat)](http://www.typescriptlang.org)\n\n# koa-check-origin\n\nA [koa](https://koajs.com) middleware that checks if the origin matches the given base URL. If not a [HTTP 403](https://http.cat/403) is thrown.\n\n## Installation 🏗\n\n`koa-check-origin` requires `Node.js \u003e= v7.6.0` because Koa [needs that](https://github.com/koajs/koa#installation) as well.\n\n```sh\n$ npm install --save koa-check-origin\n```\n\nor if you use [Yarn](https://yarnpkg.com) 🐈\n\n```sh\n$ yarn add koa-check-origin\n```\n\n## Usage 🔨\n\n```js\nconst createCheckOriginMiddleware = require('koa-check-origin');\n\nconst app = new Koa();\n\nconst checkOriginMiddleware = createCheckOriginMiddleware('http://example.com');\napp.use(checkOriginMiddleware);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholidaycheck%2Fkoa-check-origin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholidaycheck%2Fkoa-check-origin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholidaycheck%2Fkoa-check-origin/lists"}