{"id":13554984,"url":"https://github.com/imjacobclark/cors-container","last_synced_at":"2026-04-04T04:58:49.914Z","repository":{"id":5511878,"uuid":"53338032","full_name":"imjacobclark/cors-container","owner":"imjacobclark","description":"A CORS proxy in a container (Docker) for when you need to `Access-Control-Allow-Origin: *`! ","archived":false,"fork":false,"pushed_at":"2023-01-23T23:00:55.000Z","size":265,"stargazers_count":199,"open_issues_count":18,"forks_count":41,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-04T04:58:16.845Z","etag":null,"topics":["cors","cors-proxy","docker","permissive-cors"],"latest_commit_sha":null,"homepage":"https://cors-container.herokuapp.com","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/imjacobclark.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}},"created_at":"2016-03-07T15:55:04.000Z","updated_at":"2025-11-19T05:37:31.000Z","dependencies_parsed_at":"2023-02-13T04:30:32.709Z","dependency_job_id":null,"html_url":"https://github.com/imjacobclark/cors-container","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imjacobclark/cors-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjacobclark%2Fcors-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjacobclark%2Fcors-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjacobclark%2Fcors-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjacobclark%2Fcors-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imjacobclark","download_url":"https://codeload.github.com/imjacobclark/cors-container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjacobclark%2Fcors-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"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":["cors","cors-proxy","docker","permissive-cors"],"created_at":"2024-08-01T12:02:59.132Z","updated_at":"2026-04-04T04:58:49.895Z","avatar_url":"https://github.com/imjacobclark.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","docker"],"sub_categories":[],"readme":"# cors-container\n\nA CORS proxy in a container (Docker) for when you need to `Access-Control-Allow-Origin: *`! \n\n[![Build Status](https://travis-ci.org/imjacobclark/cors-container.svg)](https://travis-ci.org/imjacobclark/cors-container)\n[![Docker Pulls](https://img.shields.io/docker/pulls/imjacobclark/cors-container.svg)](https://hub.docker.com/r/imjacobclark/cors-container/)\n\nYou can use CORS Container without running it yourself via Heroku (it's on a free tier dyno, so initial startup time may be slow!) [https://cors-container.herokuapp.com](https://cors-container.herokuapp.com).\n\n## About\n\nIf you need permissive CORS for a front-end project, simply deploy this container and proxy your HTTP requests through it.\n\nOnce the container is running, you may navigate to [http://container-address:3000/https://jacobclark.xyz](http://container-address:3000/https://jacobclark.xyz), `cors-container` will then proxy the specified resource and transform the original headers to be CORS permissive, whilst keeping origional headers in-tact.\n\nIf you intend to use this in production over the open web, ensure the service is locked down with restrictive firewall/access permissions, otherwise any content may be proxied over your server.\n\nI suggest implementing proper CORS headers on your resources and using this for development purposes only.\n\n## Relative URL rewriting \n\ncors-container can rewrite relative URLs to full URLs of the response body you have proxied. \n\nFor example if we wish to proxy `http://blog.jacobclark.xyz/` and cors-container is runinnng on `http://localhost:3000/` the request URL would be `http://localhost:3000/http://blog.jacobclark.xyz/`.\n\ncors-container will rewrite any relative URLs it finds in the proxies response body. For example `\u003ca href=\"/css/style.css\"\u003e` would be modified to `\u003ca href=\"http://localhost:3000/http://blog.jacobclark.xyz/css/style.css\"\u003e` in the proxied response.\n\nThis can be useful if you wish to be able to pull additional assets on a page through the proxy such as stylesheets and JavaScript. \n\nThis is not enabled by default as this option mutates the original response body. \n\nSet `rewrite-urls` in the request header to cors-cotainer if you want relative URLs rewriting.\n\n## Deploying\n\n### Docker(hub)\n\n```bash\n$ docker pull imjacobclark/cors-container\n$ docker run --restart=always -d -p 3000:3000 --name cors-container imjacobclark/cors-container\n```\n\n### Docker(source)\n\n```shell\n$ git pull https://github.com/imjacobclark/cors-container.git \u0026\u0026 cd cors-container\n$ docker build -t cors-container .\n$ docker run --restart=always -d -p 3000:3000 --name cors-container cors-container\n```\n\n### Node\n\n```shell\n$ git pull https://github.com/imjacobclark/cors-container.git \u0026\u0026 cd cors-container\n$ npm run test \u0026\u0026 npm start\n```\n\n## Thanks to\n\n* [Express](http://expressjs.com/)\n* [request-promise](https://github.com/request/request-promise)\n* [rel-to-abs](https://github.com/auth0/rel-to-abs)\n* [Supertest](https://github.com/visionmedia/supertest)\n* [Mocha](http://mochajs.org/)\n* [Nock](https://github.com/pgte/nock)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjacobclark%2Fcors-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimjacobclark%2Fcors-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjacobclark%2Fcors-container/lists"}