{"id":16776277,"url":"https://github.com/maxmilton/cors-proxy","last_synced_at":"2025-04-10T20:13:48.493Z","repository":{"id":37955056,"uuid":"197077697","full_name":"maxmilton/cors-proxy","owner":"maxmilton","description":"A simple transparent proxy that adds permissive CORS headers to API responses.","archived":false,"fork":false,"pushed_at":"2024-08-31T17:55:07.000Z","size":364,"stargazers_count":3,"open_issues_count":9,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T09:09:16.618Z","etag":null,"topics":["bypass","bypass-cors","cors","cors-proxy","cors-request","nginx","nginx-proxy","nodejs","proxy"],"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/maxmilton.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}},"created_at":"2019-07-15T21:54:52.000Z","updated_at":"2023-06-28T14:44:47.000Z","dependencies_parsed_at":"2024-01-09T03:40:08.943Z","dependency_job_id":null,"html_url":"https://github.com/maxmilton/cors-proxy","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmilton%2Fcors-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmilton%2Fcors-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmilton%2Fcors-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmilton%2Fcors-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxmilton","download_url":"https://codeload.github.com/maxmilton/cors-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288362,"owners_count":21078903,"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":["bypass","bypass-cors","cors","cors-proxy","cors-request","nginx","nginx-proxy","nodejs","proxy"],"created_at":"2024-10-13T07:09:26.446Z","updated_at":"2025-04-10T20:13:48.473Z","avatar_url":"https://github.com/maxmilton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://img.shields.io/github/workflow/status/MaxMilton/cors-proxy/ci)](https://github.com/MaxMilton/cors-proxy/actions)\n[![License](https://img.shields.io/github/license/MaxMilton/cors-proxy.svg)](https://github.com/MaxMilton/cors-proxy/blob/master/LICENSE)\n\n# cors-proxy\n\nA simple transparent proxy that adds permissive CORS and CORP headers to all HTTP responses. It allows you to bypass [CORS restrictions](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) and [CORP restrictions](\u003chttps://developer.mozilla.org/en-US/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)\u003e) on an API for development or testing purposes.\n\nIt works in two parts, a Node.js server and an Nginx reverse proxy.\n\n\"Why is node required?\" you might ask... well, if the target API endpoint is known ahead of time it's possible to create a solution using only Nginx or HAProxy. But to target any endpoint dynamically, extra logic is required. A Lua script in Nginx or HAproxy would be a more elegant solution but for the sake of quick implementation and ease of tracking errors/requests a node server is used here.\n\n## Setup\n\n1. Clone this repo to your server or dev environment.\n1. Make changes to `index.js` and `server.js` if required.\n1. Set up an [Nginx](https://nginx.org/en/) virtual host using `nginx.conf` as a template.\n1. Run `node index.js`.\n\n## Usage\n\n### Basic proxy\n\nTo use the service prepend its URL before the API you want to access. For example, if you set up cors-proxy with an endpoint `https://cors-proxy.yourdomain.com` and the API you want to access is `https://swapi.dev/api/people/1/`, then you should fetch:\n\n```\nhttps://cors-proxy.yourdomain.com/https://swapi.dev/api/people/1/\n```\n\n### Bypass HTTPS\n\nIf you set up Nginx as in the `nginx.conf` template, you can make a request to a `https` API URL over `http`. This is useful for devices with old CA certificates or no modern TLS support. Simply use http instead of https:\n\n```\nhttp://cors-proxy.yourdomain.com/https://swapi.dev/api/people/1/\n```\n\n## License\n\nMIT license. See [LICENSE](https://github.com/maxmilton/cors-proxy/blob/master/LICENSE).\n\n---\n\n© 2021 [Max Milton](https://maxmilton.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmilton%2Fcors-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmilton%2Fcors-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmilton%2Fcors-proxy/lists"}