{"id":19621345,"url":"https://github.com/commenthol/proxyy","last_synced_at":"2026-06-10T18:31:48.248Z","repository":{"id":65476843,"uuid":"121103904","full_name":"commenthol/proxyy","owner":"commenthol","description":"A http(s) proxy middleware","archived":false,"fork":false,"pushed_at":"2024-03-20T20:16:43.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-05T21:28:18.349Z","etag":null,"topics":["cookie","http","https","middleware","proxy","rewrite","url"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/commenthol.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":"2018-02-11T08:47:33.000Z","updated_at":"2024-03-20T20:15:50.000Z","dependencies_parsed_at":"2024-11-11T11:24:02.746Z","dependency_job_id":"7b4f9d5b-fe18-43af-8288-7a68b4e92b79","html_url":"https://github.com/commenthol/proxyy","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"2de7bc7634f7e208d482997297c18a1d63eab2aa"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/commenthol/proxyy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fproxyy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fproxyy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fproxyy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fproxyy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commenthol","download_url":"https://codeload.github.com/commenthol/proxyy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fproxyy/sbom","scorecard":{"id":300836,"data":{"date":"2025-08-11","repo":{"name":"github.com/commenthol/proxyy","commit":"9696a47e311c352c68f4d0783320f5923b585af7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/commenthol/proxyy/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/commenthol/proxyy/ci.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T20:35:10.397Z","repository_id":65476843,"created_at":"2025-08-17T20:35:10.397Z","updated_at":"2025-08-17T20:35:10.397Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34165482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["cookie","http","https","middleware","proxy","rewrite","url"],"created_at":"2024-11-11T11:22:26.385Z","updated_at":"2026-06-10T18:31:48.229Z","avatar_url":"https://github.com/commenthol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proxyy\n\n\u003e A http(s) proxy middleware\n\n[![npm-badge][npm-badge]][npm]\n[![actions-badge][actions-badge]][actions]\n\nNon-transparent http(s) proxy connect middleware with the ability to rewrite location headers and cookies.\n\nDoes:\n- Adds `X-Forwarded-For` header entry.\n- Copes with connection errors and timeouts.\n- URL rewriting in HTML pages\n- Rewrites Location headers\n- Rewrites Cookie Domains and Paths (follows [nginx.org](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain) approach)\n- Rewrites Referer request headers\n\nWhy another proxy middleware? Check-out:\n- [proxy-middleware](https://www.npmjs.com/package/proxy-middleware)\n- [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware)\n- [mod-proxy](https://www.npmjs.com/package/mod-proxy)\n- Others?\n- You choose...\n\n## API\n\nFor all possible `options` related to http/https see\n- [http request options](https://nodejs.org/api/http.html#http_http_request_options_callback)\n- [https request options](https://nodejs.org/api/https.html#https_https_request_options_callback)\n\n### Parameters\n\n| parameter                 | type     | description                    |\n| ------------------------- | -------- | -------------------------------|\n| `[url]`                   | String   | _optional:_ base url to proxy  |\n| `[options]`               | Object   | _optional:_ http, https options |\n| `options.method`          | String   | upercase HTTP method |\n| `options.protocol`        | String   | `http:` or `https:` see [url.parse()][url.parse] |\n| `options.hostname`        | String   | hostname |\n| `options.port`            | String   | port     |\n| `options.path`            | String   | path     |\n| `[options.timeout=5000]`  | Number   | _optional:_ timeout in (ms) default=5000 |\n| `[option.onResponse]`     | Function | _optional:_ `function (clientRes, res)` allows to change statuscode and/or headers |\n| `[option.baseUrl]`        | String   | _optional:_ baseUrl of routed request, comes usually from express |\n| `[options.cookieDomains]` | Array    | _optional:_  see example |\n| `[options.cookiePaths]`   | Array    | _optional:_  see example |\n| `[options.preserveHost=false]`  | Boolean  | _optional:_  if `true` request host header is preserved |\n| `[option.isForwarded=false]`    | Boolean  | _optional:_  request was forwarded from other server which set `x-forwarded-host` and `x-forwarded-proto` headers |\n| `[option.noHtmlRewrite=false]`  | Boolean  | _optional:_  Do not rewrite html/ xml responses |\n\n### Examples\n\n**With Url**\n\n```js\nconst proxy = require('proxyy')\nconst app = require('express')()\n\napp.use('/api', proxy('https://server.my')\napp.listen(3000)\n\n//\u003e proxies 'http://localhost:3000/api/path' to 'https://server.my/path'\n```\n\n**With options and legacy server**\n\n```js\nconst http = require('http')\n\nhttp.createServer(proxy({\n  baseUrl: '/proxied',  // if using `express` 'baseUrl' is handled via express routing\n                        // so no need to set this with `express`\n  protocol: 'http:',\n  host: 'server.my',\n  port: '4000',\n  path: '/api',\n  timeout: 5000\n})).listen(3000)\n\n//\u003e proxies 'http://localhost:3000/proxied/path' to 'http://server.my:4000/api/path'\n```\n\n**Rewriting Cookies**\n\n```js\n// proxy DNS is 'proxy.my'\napp.use('/api', proxy(\n  'https://api.server.my/path', {\n    cookieDomains: [\n      ['www.server.my', 'www.proxy.my'], // replace string by string\n      [/^(\\w+)\\.server.com/, '$1.proxy.my'] // replace using regex\n    ],\n    cookiePaths: [\n      ['/path', '/'], // replace string by string\n      [/^(\\w+)\\/path(\\/\\w+)/, '$1$2'] // replace using regex\n    ]\n  }\n))\n\n//\u003e Domain=www.server.my;  --\u003e Domain=www.proxy.my;\n//\u003e Domain=api.server.com; --\u003e Domain=api.proxy.my;\n\n//\u003e Path=/path;       --\u003e Path=/;\n//\u003e Path=/a/path/doc; --\u003e Path=/a/doc;\n```\n\n## Installation\n\nRequires [nodejs](http://nodejs.org/).\n\n```sh\n$ npm install proxyy --save\n```\n\n## Tests\n\n```sh\n$ npm test\n```\n\n## License\n\n[MIT Licensed](./LICENSE)\n\n[url.parse]: https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost\n[npm-badge]: https://badgen.net/npm/v/proxyy\n[npm]: https://www.npmjs.com/package/proxyy\n[actions-badge]: https://github.com/commenthol/proxyy/workflows/CI/badge.svg?branch=master\u0026event=push\n[actions]: https://github.com/commenthol/proxyy/actions/workflows/ci.yml?query=branch%3Amaster\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fproxyy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommenthol%2Fproxyy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fproxyy/lists"}