{"id":20872379,"url":"https://github.com/romnn/proxybootstrap","last_synced_at":"2025-08-10T13:22:22.558Z","repository":{"id":57455205,"uuid":"223627891","full_name":"romnn/proxybootstrap","owner":"romnn","description":"A simple python wrapper script for bootstrapping a reverse proxy inside a docker container.","archived":false,"fork":false,"pushed_at":"2024-03-20T15:32:40.000Z","size":101,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T17:25:30.380Z","etag":null,"topics":["ci","cors","dev-proxy","frontend","helper","proxy","python","python-wrapper-script","reverse-proxy","web-development"],"latest_commit_sha":null,"homepage":"","language":"Python","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/romnn.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":"2019-11-23T17:32:01.000Z","updated_at":"2021-02-03T23:53:35.000Z","dependencies_parsed_at":"2025-03-12T15:51:08.181Z","dependency_job_id":null,"html_url":"https://github.com/romnn/proxybootstrap","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/romnn/proxybootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fproxybootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fproxybootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fproxybootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fproxybootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romnn","download_url":"https://codeload.github.com/romnn/proxybootstrap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fproxybootstrap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269731151,"owners_count":24466167,"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-08-10T02:00:08.965Z","response_time":71,"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":["ci","cors","dev-proxy","frontend","helper","proxy","python","python-wrapper-script","reverse-proxy","web-development"],"created_at":"2024-11-18T06:18:55.774Z","updated_at":"2025-08-10T13:22:22.510Z","avatar_url":"https://github.com/romnn.png","language":"Python","readme":"## CORS reverse development proxy\n[![Build Status](https://github.com/romnn/proxybootstrap/workflows/test/badge.svg)](https://github.com/romnn/proxybootstrap/actions)\n[![PyPI License](https://img.shields.io/pypi/l/proxybootstrap)](https://pypi.org/project/proxybootstrap/)\n[![PyPI Version](https://img.shields.io/pypi/v/proxybootstrap)](https://pypi.org/project/proxybootstrap/)\n[![PyPI Python versions](https://img.shields.io/pypi/pyversions/proxybootstrap)](https://pypi.org/project/proxybootstrap/)\n\nA simple yet extensible python wrapper script for templating a proxy `nginx` configuration\nthat functions as host mapped reverse proxy container. \n\n#### Why and when to use?\nModern browsers enforce CORS policy and [won't let you](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) make requests\nfrom your frontend running on `localhost:8080` to your backend at \n`localhost:4000`. To solve this problem, start a proxy at `localhost:5000`\n(or any other spare port) and proxy requests based on paths:\n- `localhost:5000/api` and `localhost:5000/buy` will be routed to the backend `localhost:4000`\n- `localhost:5000/` will be routed to the frontend `localhost:8080`\n\n#### Installation and usage\n```bash\npip install proxybootstrap # using pip\n```\n**Note**: You will need `docker` for running the proxy container\n\nStart the proxy server with your configuration\n```bash\nproxybootstrap \\\n    --port 5000 \\\n    /api@http://127.0.0.1:4000 /buy@http://127.0.0.1:4000 /@http://127.0.0.1:8080\n```\n\n#### Customization\n| Option                | Description                                       | Default \n| ----------------------|:--------------------------------------------------|---------\n| `locations`           | service locations to proxy.                       | None\n| `-c` / `-config`      | `nginx` config template file                      | `./config/default.conf`\n| `--port`              | listening port for the reverse proxy              | 5000\n| `--verbose`           | enable verbose output                             | `False`\n| `--sync`              | force synchronous communication with the proxy    | `False`\n| `--tag`               | docker tag for the reverse proxy container        | dev/cors-reverse-proxy\n| `--dockerfile`        | dockerfile for building the container             | `./Dockerfile`\n\n\nUnder the hood, configuration options are applied to the `--config` template\nfile and rendered using `jinja2`. If you wish, you can pass additional arguments and use\nthem in the config template.\nExample:\n```bash\nproxybootstrap \\\n    -my_var1 Test1 \\\n    --my_var2 Test2 \\\n    --port 5000 \\\n    /@http://127.0.0.1:8080\n```\ncan be accessed in a template with\n```\n{{ my_var1 }}\n{{ my_var2 }}\n```\n\n#### Alternatives\n- Write a custom proxy configuration for `nginx` or other proxy servers like\n`trafik`, `envoy` or `haproxy`\n- When using webpack or another popular tool there might be some plugins like \n[devserver-proxy](https://cli.vuejs.org/config/#devserver-proxy) for [vuejs](https://vuejs.org)\n- Mess around with headers to allow specific CORS requests\n\n#### Development\nIf you do not have `pipx` and `pipenv`, install with\n```bash\npython3 -m pip install --user pipx\npython3 -m pipx ensurepath\npipx install pipenv\n```\n\nInstall all dependencies with\n```bash\npipenv install --dev\n```\n\nTo format, sort imports and check PEP8 conformity, run\n```bash\npipenv run black .\npipenv run isort\npipenv run flake8\n```\n(These are also configured as a git pre commit hook)\n\n#### Notice\nThis configuration is very minimal and intended for development use only.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fproxybootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromnn%2Fproxybootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fproxybootstrap/lists"}