{"id":17188226,"url":"https://github.com/jclem/koa-ssl","last_synced_at":"2025-04-13T19:13:16.623Z","repository":{"id":16176278,"uuid":"18922666","full_name":"jclem/koa-ssl","owner":"jclem","description":"Enforce SSL for Koa apps","archived":false,"fork":false,"pushed_at":"2018-08-10T22:00:19.000Z","size":8,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T17:31:10.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npm.im/koa-ssl","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jclem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-18T19:07:33.000Z","updated_at":"2019-08-13T15:39:59.000Z","dependencies_parsed_at":"2022-07-25T03:24:31.539Z","dependency_job_id":null,"html_url":"https://github.com/jclem/koa-ssl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fkoa-ssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fkoa-ssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fkoa-ssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jclem%2Fkoa-ssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jclem","download_url":"https://codeload.github.com/jclem/koa-ssl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589881,"owners_count":21129697,"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":[],"created_at":"2024-10-15T01:08:26.834Z","updated_at":"2025-04-13T19:13:16.603Z","avatar_url":"https://github.com/jclem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-ssl\n\n[![Circle CI](https://circleci.com/gh/jclem/koa-ssl.svg?style=svg)](https://circleci.com/gh/jclem/koa-ssl)\n\nkoa-ssl enforces SSL for [Koa][koa] apps.\n\n## Use\n\nSimply require and use the function exported by this module:\n\n```javascript\nvar ssl = require('koa-ssl');\nvar app = require('koa')();\napp.use(ssl());\n```\n\nThe function takes an optional object of options:\n\n- `disabled`: (default `false`) If `true`, this middleware will allow all\nrequests through.\n- `trustProxy`: (default `false`) If `true`, trust the `x-forwarded-proto`\nheader. If it is \"https\", requests are allowed through.\n- `disallow`: A non-Generator function called with the Koa context so that the\nuser can handle rejecting non-SSL requests themselves.\n\nBy default, this middleware will only run when `process.env.NODE_ENV` is set to\n\"production\". Unless a `disallow` function is supplied it will respond with the\nstatus code 403 and the body \"Please use HTTPS when communicating with this\nserver.\"\n\n## Thanks, Heroku\n\nWhile I created and maintain this project, it was done while I was an employee\nof [Heroku][heroku] on the Human Interfaces Team, and they were kind enough to\nallow me to open source the work. Heroku is awesome.\n\n[heroku]: https://www.heroku.com/home\n[koa]: https://github.com/koajs/koa\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjclem%2Fkoa-ssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjclem%2Fkoa-ssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjclem%2Fkoa-ssl/lists"}