A sample route service written in Go.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore Log response from backend. Jul 7, 2015
LICENSE Initial commit Jul 2, 2015


Example Route Service

An example route service for Cloud Foundry.

Route Service Overview

The Route Service feature is currently in development, the proposal can be found in this Google Doc.

This example route service uses the new headers/features that have been added to the GoRouter. For example:

  • X-CF-Forwarded-Url: A header that contains the original URL that the GoRouter received.
  • X-CF-Proxy-Signature: A header that the GoRouter uses to determine if a request has gone through the route service.

Getting Started

  • Download this repository and cf push to your chosen CF deployment.
  • Push your app which will be associated with the route service.
  • Create a user-provided route service (see docs)
  • Bind the route service to the route (domain/hostname)
  • Tail the logs of this route service in order to verify that requests to your app go through the route service. The example logging route service will log requests and responses to and from your app.

Environment Variables


If you set this environment variable in the running app, the route service will sleep for that many milliseconds before proxying the request. This can be used to simulate route services that are slow to respond.

Example (10 seconds):

cf set-env logging-route-service ROUTE_SERVICE_SLEEP_MILLI 10000
cf restage logging-route-service


If you set this environment variable to false, the route service will validate SSL certificates. By default the route service skips SSL validation.


cf set-env logging-route-service SKIP_SSL_VALIDATION false
cf restart logging-route-service