{"id":16209142,"url":"https://github.com/robbdimitrov/apiproxy","last_synced_at":"2026-04-15T14:34:21.059Z","repository":{"id":69441915,"uuid":"351897111","full_name":"robbdimitrov/apiproxy","owner":"robbdimitrov","description":"Keeping API client secrets out of the frontends and decorating the requests in the proxy","archived":false,"fork":false,"pushed_at":"2021-04-18T20:52:06.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T08:07:28.865Z","etag":null,"topics":["expressjs","nodejs","proxy","security"],"latest_commit_sha":null,"homepage":"","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/robbdimitrov.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":"2021-03-26T19:56:25.000Z","updated_at":"2021-03-27T09:18:22.000Z","dependencies_parsed_at":"2023-05-12T09:31:19.814Z","dependency_job_id":null,"html_url":"https://github.com/robbdimitrov/apiproxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robbdimitrov/apiproxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2Fapiproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2Fapiproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2Fapiproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2Fapiproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbdimitrov","download_url":"https://codeload.github.com/robbdimitrov/apiproxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbdimitrov%2Fapiproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31845928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T13:28:40.153Z","status":"ssl_error","status_checked_at":"2026-04-15T13:28:29.396Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["expressjs","nodejs","proxy","security"],"created_at":"2024-10-10T10:28:04.316Z","updated_at":"2026-04-15T14:34:21.035Z","avatar_url":"https://github.com/robbdimitrov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Proxy\n\nProof of concept proxy using [Node](https://github.com/nodejs/node) and\n[Express](https://github.com/expressjs/express). The following technique\ncan be used to keep secrets such as API client tokens out of your frontends.\n\n## Example usage:\n\nStart the server:\n```\n$ ACCESS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 PORT=8001 node src/server.js\n```\n\nStart the proxy:\n```\n$ ACCESS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 PORT=8002 node src/proxy.js\n```\n\n## Testing requests:\n\n### `GET` request\n\nRequest:\n```\n$ curl -i -X GET localhost:8002/hello\n```\nResponse:\n```\nHTTP/1.1 200 OK\nX-Powered-By: Express\nDate: Fri, 26 Mar 2021 19:44:20 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\nTransfer-Encoding: chunked\n\n{\"type\":\"HELLO\",\"status\":\"SUCCESSFUL\"}\n```\n\n### `POST` request with body\n\nRequest:\n```\n$ curl -i -X POST localhost:8002/auth \\\n    -H 'content-type: application/json' \\\n    -d '{\"id\":1,\"name\":\"John\"}'\n```\nResponse:\n```\nHTTP/1.1 200 OK\nX-Powered-By: Express\nDate: Fri, 26 Mar 2021 19:47:10 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\nTransfer-Encoding: chunked\n\n{\"type\":\"AUTH\",\"status\":\"SUCCESSFUL\"}\n```\n\n### `POST` request with body and path parameter\n\nRequest:\n```\n$ curl -i -X POST localhost:8002/user/john \\\n    -H 'content-type: application/json' \\\n    -d '{\"name\":\"Jonathan\"}'\n```\nResponse:\n```\nHTTP/1.1 200 OK\nX-Powered-By: Express\nDate: Fri, 26 Mar 2021 19:48:35 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\nTransfer-Encoding: chunked\n\n{\"type\":\"AUTH\",\"status\":\"SUCCESSFUL\"}\n```\n\n### Direct requests to the server\n\nRequest:\n```\n$ curl -i -X GET localhost:8001/hello \n```\nResponse:\n```\nHTTP/1.1 401 Unauthorized\nX-Powered-By: Express\nContent-Type: text/html; charset=utf-8\nContent-Length: 12\nETag: W/\"c-dAuDFQrdjS3hezqxDTNgW7AOlYk\"\nDate: Fri, 26 Mar 2021 19:51:23 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n\nUnauthorized\n```\n\n## License\n\nLicensed under the [MIT](LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbdimitrov%2Fapiproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbdimitrov%2Fapiproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbdimitrov%2Fapiproxy/lists"}