{"id":44663368,"url":"https://github.com/jkernech/go-http-proxy","last_synced_at":"2026-02-15T00:02:34.820Z","repository":{"id":57584345,"uuid":"99844734","full_name":"jkernech/go-http-proxy","owner":"jkernech","description":"HTTP proxy that forward requests, useful to expose secure endpoint","archived":false,"fork":false,"pushed_at":"2018-07-24T12:05:48.000Z","size":1911,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-22T16:07:02.393Z","etag":null,"topics":["badges","docker","docker-compose","dockerfile","golang","http-proxy","proxy","sonarqube"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkernech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-09T19:18:10.000Z","updated_at":"2023-04-13T11:10:51.000Z","dependencies_parsed_at":"2022-09-10T12:42:09.383Z","dependency_job_id":null,"html_url":"https://github.com/jkernech/go-http-proxy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jkernech/go-http-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkernech%2Fgo-http-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkernech%2Fgo-http-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkernech%2Fgo-http-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkernech%2Fgo-http-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkernech","download_url":"https://codeload.github.com/jkernech/go-http-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkernech%2Fgo-http-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29461365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T22:42:09.113Z","status":"ssl_error","status_checked_at":"2026-02-14T22:42:05.053Z","response_time":53,"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":["badges","docker","docker-compose","dockerfile","golang","http-proxy","proxy","sonarqube"],"created_at":"2026-02-15T00:01:37.442Z","updated_at":"2026-02-15T00:02:34.812Z","avatar_url":"https://github.com/jkernech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## http-proxy\n\n[![Documentation](https://godoc.org/github.com/jkernech/go-http-proxy?status.svg)](https://godoc.org/github.com/jkernech/go-http-proxy)\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=go-http-proxy\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=go-http-proxy)\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=go-http-proxy\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=go-http-proxy)\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=go-http-proxy\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=go-http-proxy)\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=go-http-proxy\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=go-http-proxy)\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=go-http-proxy\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=go-http-proxy)\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=go-http-proxy\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=go-http-proxy)\n\n\nHTTP proxy that forward requests, useful to expose secure endpoint.\n\n### Demo\n\n#### Standard queries\nSpecifying the URL in the path forward a given request, e.g\n\nhttps://go-http-proxy.herokuapp.com/https://gocover.io/_badge/github.com/jkernech/go-http-proxy\n\n#### Mapped queries\nSetting the `PATH_MAPPING` env var allows to use shorthand path according to the host mapped, useful for websites that requires basic authentication), e.g\n\nhttps://go-http-proxy.herokuapp.com/https://godoc.org/github.com/jkernech/go-http-proxy?status.svg (simple request forwarding)\n\nhttps://go-http-proxy.herokuapp.com/sonar/api/badges/measure?key=service-analytics\u0026metric=lines (request forwarding with basic authentication)\n\n### Configuration\nThe following environment variables allow to customise the application\n```\nPORT=8080 // default port on which the http-proxy listen\nPATH_MAPPING={} // key/value of paths matching hosts, default is an empty object\n```\n\n#### PORT\nCan be replace by the value of your choice\n\n#### PATH_MAPPING\nOptional, JSON object of paths matching hosts.\n\nFor example, if you want to expose publicly Sonarqube badges since they require basic authentication:\n```\nPATH_MAPPING={\"sonar\": \"http://\u003ctoken\u003e@sonar.your_domain.com\"}\n```\n\nNow you can request the server without credentials.\n\n [http://localhost:8080/sonar/api/badges/measure?key=%your_project%\u0026metric=lines]([http://localhost:8080/sonar/api/badges/measure?key=\u003cyour_project\u003e\u0026metric=lines)\n\nHere is another request forwarded [http://localhost:8080/google/?q=test](http://localhost:8080/google/?q=test)\n```\nPATH_MAPPING={\"google\": \"https://www.google.com\"}\n# forward to http://www.google.com/?q=test\n```\n\n### Setup\n\n#### From the sources\n\n*Golang development environment needs to be setup on your machine.*\n\nOnce you cloned the repository, you can run the application with the following command:\n\n```\nmake run\n```\n\nNote that you can configure the app as needed by setting your environment variables.\n\nWe strongly recommend to use a `dotenv` file locally, the template provided is reusable so you can copy it and customize it as needed:\n\n```\ncp .env.tpl .env // customize the .env file as needed\nmake run\n```\n\n#### Docker\n\n*Docker environment needs to be setup on your machine.*\n\nRun it locally:\n```\ndocker run -p 8080:8080 -e PATH_MAPPING='{\"google\": \"https://www.google.com\", \"sonar\": \"http://\u003ctoken\u003e@sonar.your_domain.com\"}' -it jkernech/http-proxy\n```\n\n#### Docker Compose\n\n*Docker environment needs to be setup on your machine.*\n\nOnce you cloned the repository, make sure to update the environment variables in the `docker-compose.yml` file before executing the following command\n```\ndocker-compose up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkernech%2Fgo-http-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkernech%2Fgo-http-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkernech%2Fgo-http-proxy/lists"}