logging-route-service

command module
v0.0.0-...-e634941 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

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

ROUTE_SERVICE_SLEEP_MILLI

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
SKIP_SSL_VALIDATION

Set this environment variable to true in order to skip the validation of SSL certificates. By default the route service will attempt to validate certificates.

Example:

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL