To
Summary
To is the destination(s) of a proxied request. It can be an internal resource, or an external resource.
How to configure
- Core
- Enterprise
- Kubernetes
YAML/JSON setting | Type | Usage | Schemes |
---|---|---|---|
to | URL | optional | http , https , tcp |
Examples
- from: https://example.com
to: http://verify
- from: https://example.com
to: https://192.1.20.12:8080
- from: https://example.com
to: http://neverssl.com
- from: https://example.com
to: https://verify.pomerium.com/anything/
Set To in the Console:
See Kubernetes Ingress for more information.
Target multiple upstream resources
Multiple upstream resources can be targeted by using a list instead of a single URL:
- from: https://example.com
to:
- https://a.example.com
- https://b.example.com
Set load balancing weight
A load balancing weight may be associated with a particular upstream by appending ,[weight]
to the URL. The exact behavior depends on your lb_policy
setting. See Load Balancing for example configurations.
- from: https://example.com
to: ['http://a', 'http://b']
- from: https://example.com
to: ['http://a,10', 'http://b,20']
Must be tcp
if from
is tcp+https
.
See Routing - Route matching order for more information on how Pomerium processes and matches routes.
See Routing - Route matching order for more information on how Pomerium processes and matches routes.
Be careful with trailing slash.
With rule:
- from: https://verify.corp.example.com
to: https://verify.pomerium.com/anything
Requests to https://verify.corp.example.com
will be forwarded to https://verify.pomerium.com/anything
, while requests to https://verify.corp.example.com/foo
will be forwarded to https://verify.pomerium.com/anythingfoo
.To make the request forwarded to https://httbin.org/anything/foo
, you can use double slashes in your request https://httbin.corp.example.com//foo
.
While the rule:
- from: https://verify.corp.example.com
to: https://verify.pomerium.com/anything/
All requests to https://verify.corp.example.com/*
will be forwarded to https://verify.pomerium.com/anything/*
. That means accessing to https://verify.corp.example.com
will be forwarded to https://verify.pomerium.com/anything/
. That said, if your application does not handle trailing slash, the request will end up with 404 not found.
Either redirect
or to
must be set.