{"id":24312831,"url":"https://github.com/nicolaspearson/gogo-cors-proxy","last_synced_at":"2025-09-26T18:31:55.719Z","repository":{"id":45960510,"uuid":"149313614","full_name":"nicolaspearson/gogo-cors-proxy","owner":"nicolaspearson","description":"A simple Golang proxy which adds CORS headers to an incoming request.","archived":false,"fork":false,"pushed_at":"2021-07-14T14:27:04.000Z","size":4,"stargazers_count":16,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T01:57:51.673Z","etag":null,"topics":["cors","golang","proxy"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/nicolaspearson.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":"2018-09-18T15:46:52.000Z","updated_at":"2024-01-23T19:08:56.000Z","dependencies_parsed_at":"2022-08-28T14:20:56.955Z","dependency_job_id":null,"html_url":"https://github.com/nicolaspearson/gogo-cors-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaspearson%2Fgogo-cors-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaspearson%2Fgogo-cors-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaspearson%2Fgogo-cors-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaspearson%2Fgogo-cors-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolaspearson","download_url":"https://codeload.github.com/nicolaspearson/gogo-cors-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234333683,"owners_count":18815790,"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":["cors","golang","proxy"],"created_at":"2025-01-17T08:30:25.983Z","updated_at":"2025-09-26T18:31:50.421Z","avatar_url":"https://github.com/nicolaspearson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Go Cors Proxy\n\nA simple **Go** proxy which adds CORS headers to an incoming request. This allows your application to execute requests on a resource hosted on a different domain.\n\n## Getting Started\n\n1. Download and [install](https://golang.org/doc/install) Go\n2. Setup your $GOROOT and $GOPATH in your bashrc / zshrc, for example:\n```\n    export GOROOT=/usr/local/go\n    export GOPATH=/dev/go\n    export PATH=$PATH:$GOROOT/bin:$GOPATH/bin\n```\n\n## Application Flags\n\n| Flag | Default | Description |\n| -------- |:------- |:----------- |\n| `target` | localhost:8080 | host:port to proxy requests to |\n| `listen` | localhost:8181 | host:port to listen on |\n| `protocol` | http | protocol used by the target |\n| `host` | localhost:3000 | host header to be used for the proxy request |\n| `origin` | `http://localhost:3000` | origin header to be used for the proxy request |\n| `methods` | true | enable / disable default access control methods |\n| `debug` | false | enable / disable debug messages |\n\n## Running The Application\n\nOnce **Go** has been correctly installed and configured, execute:\n\n`go run proxy.go -target=0.0.0.0:8080 -listen=0.0.0.0:8181 -host=localhost:3000 -origin=http://localhost:3000`\n\nNow all incoming requests on port `8181` will be proxied to `http://0.0.0.0:8080`\n\n## Docker\n\nThe Docker image is hosted on [Docker Hub](https://hub.docker.com/r/nicpearson/gogo-cors-proxy/)\n\n### Using The Docker Image\n\nPlease see the `docker-compose.yml` file for an example of how the image may be used.\n\n### Building The Docker Image\n\nTo build the docker image you can simply run: `docker-compose up`\n\n## Contribution Guidelines\n\n### Pull Requests\n\nHere are some basic rules to follow to ensure timely addition of your request:\n\n  1. Match coding style (braces, spacing, etc.).\n  2. If it is a feature, bugfix, or anything please only change the minimum amount of code required to satisfy the change.\n  3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)\n  4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.\n  5. Check for existing issues first, before filing a new issue.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaspearson%2Fgogo-cors-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolaspearson%2Fgogo-cors-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaspearson%2Fgogo-cors-proxy/lists"}