diff --git a/internal/controlplane/xds_listeners_test.go b/internal/controlplane/xds_listeners_test.go index 809c50af3..6ad7c809d 100644 --- a/internal/controlplane/xds_listeners_test.go +++ b/internal/controlplane/xds_listeners_test.go @@ -86,6 +86,21 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) { "name": "example.com", "domains": ["example.com"], "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", "match": { @@ -182,6 +197,21 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) { "name": "catch-all", "domains": ["*"], "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", "match": { diff --git a/internal/controlplane/xds_routes.go b/internal/controlplane/xds_routes.go index 8241519f5..99429217c 100644 --- a/internal/controlplane/xds_routes.go +++ b/internal/controlplane/xds_routes.go @@ -41,6 +41,7 @@ func buildGRPCRoutes() []*envoy_config_route_v3.Route { func buildPomeriumHTTPRoutes(options *config.Options, domain string) []*envoy_config_route_v3.Route { routes := []*envoy_config_route_v3.Route{ + buildControlPlanePathRoute("/robots.txt"), buildControlPlanePathRoute("/ping"), buildControlPlanePathRoute("/healthz"), buildControlPlanePathRoute("/.pomerium"), diff --git a/internal/controlplane/xds_routes_test.go b/internal/controlplane/xds_routes_test.go index 42685adb5..015ec6f81 100644 --- a/internal/controlplane/xds_routes_test.go +++ b/internal/controlplane/xds_routes_test.go @@ -43,6 +43,21 @@ func Test_buildPomeriumHTTPRoutes(t *testing.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", "match": {