{"id":26059726,"url":"https://github.com/orange-cloudfoundry/gobis-server","last_synced_at":"2026-03-14T05:37:33.751Z","repository":{"id":22976622,"uuid":"97841246","full_name":"orange-cloudfoundry/gobis-server","owner":"orange-cloudfoundry","description":"Create a gobis server based on a config file","archived":false,"fork":false,"pushed_at":"2025-03-25T02:21:46.000Z","size":10909,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T04:41:34.453Z","etag":null,"topics":["api-gateway","go","gobis","golang"],"latest_commit_sha":null,"homepage":"https://github.com/orange-cloudfoundry/gobis","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orange-cloudfoundry.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":"2017-07-20T13:54:33.000Z","updated_at":"2024-10-14T01:33:26.000Z","dependencies_parsed_at":"2023-10-12T06:33:07.984Z","dependency_job_id":"c940c1a9-6e6b-4ae8-8a12-1101f094788e","html_url":"https://github.com/orange-cloudfoundry/gobis-server","commit_stats":null,"previous_names":[],"tags_count":178,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fgobis-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fgobis-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fgobis-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fgobis-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orange-cloudfoundry","download_url":"https://codeload.github.com/orange-cloudfoundry/gobis-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358548,"owners_count":21090401,"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":["api-gateway","go","gobis","golang"],"created_at":"2025-03-08T13:28:10.132Z","updated_at":"2026-03-14T05:37:31.404Z","avatar_url":"https://github.com/orange-cloudfoundry.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gobis-server\n\nCreate a [gobis](https://github.com/orange-cloudfoundry/gobis) server based on a config file.\n\nThe standalone server will make available all middlewares you can found in [gobis-middlewares](https://github.com/orange-cloudfoundry/gobis-middlewares)\n\n**Note**: To enable them in your route see parameters to set on each ones\n\n**Summary**:\n- [Installation](#installation)\n- [Commands](#commands)\n- [Usage](#usage)\n  - [In local](#in-local)\n  - [In a cloud](#in-a-cloud)\n- [Sidecar](#sidecar)\n\n## Installation\n\n```shell\ngo get github/orange-cloudfoundry/gobis-server\n```\n\nIf you set your `PATH` with `$GOPATH/bin/` you should have now a `gobis-server` binary available, this is the standalone server.\n\n## Commands\n\n```\nNAME:\n   gobis-server - Create a gobis server based on a config file\n\nUSAGE:\n   gobis-server [global options] command [command options] [arguments...]\n\nVERSION:\n   1.3.0\n\nCOMMANDS:\n     help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --config-path value, -c value              Path to the config file (This file will not be used in a cloud env like Cloud Foundry, Heroku or kubernetes) (default: \"config.yml\") [$CONFIG_FILE]\n   --cert value                               Path to a cert file or a cert content to enable https server (default: \"server.crt\")\n   --key value                                Path to a key file or a key content to enable https server (default: \"server.key\")\n   --log-level value, -l value                Log level to use\n   --log-json, -j                             Write log in json\n   --sidecar, -s                              Run server as a sidecar\n   --sidecar-app-port value                   Set port where real app is listening when running in sidecar (default: 8081) [$PROXY_APP_PORT]\n   --no-color                                 Logger will not display colors\n   --lets-encrypt-domains value, --led value  If set server will use a certificate generated with let's encrypt, value should be your domain(s) (e.g.: --lets-encrypt=example.com[,seconddomain.com]). Host and port will be overwritten to use 0.0.0.0:443\n   --help, -h                                 show help\n   --version, -v                              print the version\n```\n\n## Usage\n\nThere is two different usage:\n1. [In local](#in-local)\n2. [In a cloud](#in-a-cloud) through [gautocloud](https://github.com/cloudfoundry-community/gautocloud) (Run with ease gobis on: Kubernetes, CloudFoundry or Heroku)\n\n### In local\n\n1. Create a `config.yml` file where you want to run your server, following this schema:\n\n    ```yaml\n    # Host where server should listen (default to 0.0.0.0) \n    host: 127.0.0.1 # you can either set 0.0.0.0\n    # Port where server should listen, if empty it will look for PORT env var and if not found it will be listen on 9080\n    port: 8080\n    # List of headers which cannot be removed by `sensitive_headers`\n    protected_headers: []\n    # Set the path where all path from route should start (e.g.: if set to `/root` request for the next route will be localhost/root/app)\n    start_path: \"\"\n    routes:\n      # Name of your routes\n    - name: myapi\n      # Path which gobis handler should listen to\n      # You can use globs:\n      #   - appending /* will only make requests available in first level of upstream\n      #   - appending /** will pass everything to upstream\n      path: /app/**\n      # Upstream url where all request will be redirected (if ForwardedHeader option not set)\n      # Query parameters can be passed, e.g.: http:#localhost?param=1\n      # User and password are given as basic auth too (this is not recommended to use it), e.g.: http:#user:password@localhost\n      # Can be empty if ForwardedHeader is set\n      # This is ignored if ForwardHandler is set\n      url: http://www.mocky.io/v2/595625d22900008702cd71e8\n      # If set upstream url will be took from the value of this header inside the received request\n      # Url option will be used for the router to match host and path (if not empty) found in value of this header and host and path found in url (If NoUrlMatch is false)\n      # this useful, for example, to create a cloud foundry routes service: https:#docs.cloudfoundry.org/services/route-services.html\n      forwarded_header: \"\"\n      # List of headers which should not be sent to upstream\n      sensitive_headers: []\n      # List of http methods allowed (Default: all methods are accepted)\n      methods: []\n      # An url to an http proxy to make requests to upstream pass to this\n      http_proxy: \"\"\n      # An url to an https proxy to make requests to upstream pass to this\n      https_proxy: \"\"\n      # Force to never use proxy even proxy from environment variables\n      no_proxy: false\n      # By default response from upstream are buffered, it can be issue when sending big files\n      # Set to true to stream response\n      no_buffer: false\n      # Set to true to not send X-Forwarded-* headers to upstream\n      remove_proxy_headers: false\n      # Set to true to not check ssl certificates from upstream (not really recommended)\n      insecure_skip_verify: false\n      # Set to true to see errors on web page when there is a panic error on gobis\n      show_error: false\n      # Chain others routes in a routes\n      routes: ~\n      # Will forward directly to proxified route OPTIONS method without using middlewares\n      options_passthrough: false\n      # It was made to pass arbitrary params to use it after in gobis middlewares\n      # Here you can set cors parameters for cors middleware (see doc relative to middlewares)\n      middleware_params:\n        cors:\n          max_age: 12\n          allowed_origins:\n          - http://localhost\n    ```\n\n2. Run `gobis` in your terminal and server is now started\n\n### In a cloud\n\n**Note**: If a gobis config file exists routes, protected headers, start path and host will be merged against the service configuration.\n  \n#### On CloudFoundry as an a\n\n1. Create a CUPS service named `.*gobis-config` with the same credentials set in YAML, example:\n    ```json\n    {\n      \"protected_headers\": [\"x-header-one\"],\n      \"routes\": [\n        {\n          \"name\": \"app\",\n          \"path\": \"/**\",\n          \"url\": \"http://www.mocky.io/v2/595625d22900008702cd71e8\",\n          \"show_error\": true,\n          \"no_buffer\": false\n        }\n      ]\n    }\n    ```\n2. Bind it to your gobis instance\n\n----\n\nYou can either create a configuration to make your app be used as a route service, this how to to do this.\n\nYour configuration should use `forwarded_header` set to `X-CF-Forwarded-Url`.\n\nUrl can be omitted but if you set it to the cloud foundry route where you want to redirect it will possible to create multiple gobis routes for different cloud foundry app.\n \nExample of configuration:\n```json\n{\n  \"protected_headers\": [\"x-header-one\"],\n  \"routes\": [\n    {\n      \"name\": \"my-cf-app\",\n      \"path\": \"/**\",\n      \"url\": \"http://my_cf_app_under_gobis.external.domain.cf\",\n      \"forwarded_header\": \"X-CF-Forwarded-Url\",\n      \"show_error\": true,\n      \"no_buffer\": false\n    }\n  ]\n}\n```\n\nyou can now create an user provided route service (`cf cups to-gobis -r https://gobis.external.domain.cf`) and bind it to \nyour app route which will be under gobis (`cf bind-route-service external.domain.cf to-gobis --hostname my_cf_app_under_gobis`)\n\n#### On Heroku or Kubernetes\n\n1. Create an env var or service named `.*CONFIG` where you put your configuration in json, example:\n    ```json\n    {\n      \"protected_headers\": [\"x-header-one\"],\n      \"routes\": [\n        {\n          \"name\": \"app\",\n          \"path\": \"/**\",\n          \"url\": \"http://www.mocky.io/v2/595625d22900008702cd71e8\",\n          \"show_error\": true,\n          \"no_buffer\": false\n        }\n      ]\n    }\n    ```\n2. Your configuration should be loaded\n\n\n# Sidecar\nGobis-server can be used as a sidecar in a container. This actually mean that it will receive all traffic in front of another web app and will reverse to this app.\nSidecar intentionally force to have one route and redirect everything to app beside. \nTo do so simply run with `--sidecar` argument, this will auto-detect your environment.\nYou can chose yourself environment by using argument `--sidecar-env`\n\nSee [sidecars-buildpack](https://github.com/orange-cloudfoundry/sidecars-buildpack) for usage on a cloud supporting buildpacks.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forange-cloudfoundry%2Fgobis-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forange-cloudfoundry%2Fgobis-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forange-cloudfoundry%2Fgobis-server/lists"}