mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-01 19:36:32 +02:00
controlplane: add robots route (#966)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
f11c5ba172
commit
f94f45d9a2
3 changed files with 46 additions and 0 deletions
|
@ -86,6 +86,21 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) {
|
||||||
"name": "example.com",
|
"name": "example.com",
|
||||||
"domains": ["example.com"],
|
"domains": ["example.com"],
|
||||||
"routes": [
|
"routes": [
|
||||||
|
{
|
||||||
|
"name": "pomerium-path-/robots.txt",
|
||||||
|
"match": {
|
||||||
|
"path": "/robots.txt"
|
||||||
|
},
|
||||||
|
"route": {
|
||||||
|
"cluster": "pomerium-control-plane-http"
|
||||||
|
},
|
||||||
|
"typedPerFilterConfig": {
|
||||||
|
"envoy.filters.http.ext_authz": {
|
||||||
|
"@type": "type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "pomerium-path-/ping",
|
"name": "pomerium-path-/ping",
|
||||||
"match": {
|
"match": {
|
||||||
|
@ -182,6 +197,21 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) {
|
||||||
"name": "catch-all",
|
"name": "catch-all",
|
||||||
"domains": ["*"],
|
"domains": ["*"],
|
||||||
"routes": [
|
"routes": [
|
||||||
|
{
|
||||||
|
"name": "pomerium-path-/robots.txt",
|
||||||
|
"match": {
|
||||||
|
"path": "/robots.txt"
|
||||||
|
},
|
||||||
|
"route": {
|
||||||
|
"cluster": "pomerium-control-plane-http"
|
||||||
|
},
|
||||||
|
"typedPerFilterConfig": {
|
||||||
|
"envoy.filters.http.ext_authz": {
|
||||||
|
"@type": "type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "pomerium-path-/ping",
|
"name": "pomerium-path-/ping",
|
||||||
"match": {
|
"match": {
|
||||||
|
|
|
@ -41,6 +41,7 @@ func buildGRPCRoutes() []*envoy_config_route_v3.Route {
|
||||||
|
|
||||||
func buildPomeriumHTTPRoutes(options *config.Options, domain string) []*envoy_config_route_v3.Route {
|
func buildPomeriumHTTPRoutes(options *config.Options, domain string) []*envoy_config_route_v3.Route {
|
||||||
routes := []*envoy_config_route_v3.Route{
|
routes := []*envoy_config_route_v3.Route{
|
||||||
|
buildControlPlanePathRoute("/robots.txt"),
|
||||||
buildControlPlanePathRoute("/ping"),
|
buildControlPlanePathRoute("/ping"),
|
||||||
buildControlPlanePathRoute("/healthz"),
|
buildControlPlanePathRoute("/healthz"),
|
||||||
buildControlPlanePathRoute("/.pomerium"),
|
buildControlPlanePathRoute("/.pomerium"),
|
||||||
|
|
|
@ -43,6 +43,21 @@ func Test_buildPomeriumHTTPRoutes(t *testing.T) {
|
||||||
|
|
||||||
testutil.AssertProtoJSONEqual(t, `
|
testutil.AssertProtoJSONEqual(t, `
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "pomerium-path-/robots.txt",
|
||||||
|
"match": {
|
||||||
|
"path": "/robots.txt"
|
||||||
|
},
|
||||||
|
"route": {
|
||||||
|
"cluster": "pomerium-control-plane-http"
|
||||||
|
},
|
||||||
|
"typedPerFilterConfig": {
|
||||||
|
"envoy.filters.http.ext_authz": {
|
||||||
|
"@type": "type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthzPerRoute",
|
||||||
|
"disabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "pomerium-path-/ping",
|
"name": "pomerium-path-/ping",
|
||||||
"match": {
|
"match": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue