You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
Each application configuration is a JSON document adhering to the following schema:
Property
Type
backend(required)
[Backend configuration](#Backend configuration)
routing(required)
[Routing configuration](#Routing configuration)
caching
[Caching configuration](#Caching configuration) or empty (not specifying this value will disable caching)
auth
[Authentication configuration](#Application authentication configuration) or empty (if unspecified, authentication will be required by the gateway, but not forwarded to the upstream service)
rate_limiting
true, false or empty (false if unspecified)
Backend configuration
A backend configuration must consist of either a url property or a service property. They are mutually exclusive.
Property
Type
Description
url(required if service is not set)
string
The backend URL
service(required if url is not set)
string
The service name (must be registered with this ID as a service in Consul)
tag
string
A service tag as registered in Consul (only when the service property is set)
username
string
A username to use for HTTP basic authentication at the upstream service
password
string
A password to use for HTTP basic authentication (only required when username is also set)
path
string
An URL path to prepend for upstream requests (and to strip from upstream responses) -- only when the service property is set
Routing configuration
Property
Type
Description
type(required)
string
One of hostname, path or pattern. See [Routing and Dispatching](#Routing and Dispatching) for more information
hostname(required if type is hostname)
string
Requests with this hostname (HTTP Host header) will be routed to this upstream application
path(required if type is path)
string
Requests with this path prefix will be routed to this upstream application
patterns(required if type is pattern)
map[string]string
A map of request patterns (formatted like foo/bar/:param), using incoming request patterns as key and outgoing patterns as value.
Caching configuration
Property
Type
Description
enabled
bool
Set to true to enable caching
ttl
int
Default time-to-live in seconds
auto_flush
bool
Automatically flush the cache if a non-GET request is sent to the same URI (really useful for really RESTful webservices)
Application authentication configuration
Property
Type
Description
disable
bool
Set to true to disable authentication for this upstream service
How the authentication token should be written in requests made to the upstream service. See [authentication forwarding](#Authentication forwarding) for more information.
Authentication writer configuration
Property
Type
Description
mode(required)
string
One of header or authorization
name(required)
string
Name of the header (depending on mode)
Static configuration
The static configuration file is a JSON document consisting of the following properties:
Property
Type
Description
applications
List of [application configs](#Application configuration)
Statically configured applications. These will be loaded before the ones configured in Consul and can not be overwritten at run-time