{"id":14957452,"url":"https://github.com/ricardocasares/next-https","last_synced_at":"2025-10-01T17:30:49.306Z","repository":{"id":57663756,"uuid":"480186521","full_name":"ricardocasares/next-https","owner":"ricardocasares","description":"Simple Next.js HTTPS proxy for local development","archived":false,"fork":false,"pushed_at":"2025-10-01T00:29:06.000Z","size":176,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T02:39:00.919Z","etag":null,"topics":["cert","certificate","https","next","next-js","proxy","react","secure","ssl","vercel"],"latest_commit_sha":null,"homepage":"","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/ricardocasares.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-11T01:26:11.000Z","updated_at":"2025-10-01T00:29:10.000Z","dependencies_parsed_at":"2023-12-19T04:22:32.654Z","dependency_job_id":"7263f45a-f32b-4e32-9a90-65522ed53404","html_url":"https://github.com/ricardocasares/next-https","commit_stats":{"total_commits":48,"total_committers":3,"mean_commits":16.0,"dds":"0.29166666666666663","last_synced_commit":"ba07aabda64b9373b58a89f2bf660fd8cfbd4c14"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/ricardocasares/next-https","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardocasares%2Fnext-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardocasares%2Fnext-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardocasares%2Fnext-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardocasares%2Fnext-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardocasares","download_url":"https://codeload.github.com/ricardocasares/next-https/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardocasares%2Fnext-https/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277787335,"owners_count":25876985,"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","status":"online","status_checked_at":"2025-10-01T02:00:09.286Z","response_time":88,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cert","certificate","https","next","next-js","proxy","react","secure","ssl","vercel"],"created_at":"2024-09-24T13:14:55.226Z","updated_at":"2025-10-01T17:30:49.054Z","avatar_url":"https://github.com/ricardocasares.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-https\n\nThis is a simple HTTPS proxy to be used with Next.js in local development.\n\n## Motivation\n\nA secure HTTP connection is necessary when interfacing with certain [Web APIs restricted to secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts). This package simply starts an HTTP proxy pointing at your Next.js server instance to simplify local development.\n\n## Getting Started\n\nInstall the package\n\n`yarn add next-https`\n\nInside your Next.js configuration file:\n\n```js\n// next.config.js\nconst useHttps = require(\"next-https\");\n\n// You can pass options here\nconst withHttps = useHttps({\n  enabled: process.env.NODE_ENV === \"development\",\n});\n\n// pass your Next.js options here\nmodule.exports = withHttps({\n  reactStrictMode: true,\n});\n```\n\n**NOTE:** When using the default configuration options, you'll have to accept the self-signed certificate the first time you access the page. This is safe to do in a local development environment only.\n\n## Configuration\n\nYou can use `next-https` with default configuration options.\n\n| name      | required | description                                                   |\n| --------- | -------- | ------------------------------------------------------------- |\n| `enabled` | `no`     | Defaults to `process.env.NODE_ENV === 'development'`          |\n| `host`    | `no`     | Next.js server hostname, defaults to `localhost`              |\n| `target`  | `no`     | Next.js port target, defaults to `3000`                       |\n| `key`     | `no`     | Path to the key, defaults to this package's key file          |\n| `cert`    | `no`     | Path to the certificate, defaults to this package's cert file |\n\n### Using custom certificates\n\nIf you want to use a custom domain name or to remove the initial warning from your browser, you'll need to setup your own certificates.\n\nTo avoid the warnings you need to install the local root CA in your computer in order for your browser to trust the certificates.\n\nFor this you can use [`mkcert`](https://github.com/FiloSottile/mkcert)\n\n```sh\nbrew install mkcert\n```\n\nInstall the local CA\n\n```sh\nmkcert -install\n```\n\nCreate the certificate files\n\n```sh\nmkcert example.com \"*.example.com\" example.test localhost 127.0.0.1 ::1\n```\n\nAnd pass your custom certificate and key\n\n```js\n// next.config.js\nconst nextHttps = require(\"next-https\");\n\n// You can pass options here\nconst withHttps = nextHttps({\n  host: \"example.com\",\n  key: './path/to/example-key.pem'),\n  cert: './path/to/example-cert.pem'),\n});\n\n// pass your Next.js options here\nmodule.exports = withHttps({\n  reactStrictMode: true,\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardocasares%2Fnext-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardocasares%2Fnext-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardocasares%2Fnext-https/lists"}