File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ static_resources:
4040 " @type " : " type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz"
4141 transport_api_version : " v3"
4242 http_service :
43- path_prefix : " /api/auth/envoy"
43+ path_prefix : " /api/auth/envoy?path= "
4444 server_uri :
4545 uri : " tinyauth:3000"
4646 cluster : " tinyauth"
@@ -51,20 +51,25 @@ static_resources:
5151 - exact : " authorization"
5252 - exact : " accept"
5353 - exact : " cookie"
54- - exact : " location"
5554 headers_to_add :
56- - key : " X-Forwarded-Proto "
55+ - key : " x-forwarded-proto "
5756 value : " %REQ(:SCHEME)%"
57+ - key : " x-forwarded-host"
58+ value : " %REQ(:AUTHORITY)%"
59+ - key : " x-forwarded-uri"
60+ value : " %REQ(:PATH)%"
5861 authorization_response :
5962 allowed_upstream_headers :
6063 patterns :
6164 - prefix : " remote-"
6265 allowed_client_headers :
6366 patterns :
6467 - exact : " set-cookie"
68+ - exact : " location"
6569 allowed_client_headers_on_success :
6670 patterns :
6771 - exact : " set-cookie"
72+ - exact : " location"
6873 failure_mode_allow : false
6974 - name : " envoy.filters.http.router"
7075 typed_config :
@@ -98,14 +103,3 @@ static_resources:
98103 socket_address :
99104 address : " tinyauth"
100105 port_value : 3000
101- layered_runtime :
102- layers :
103- - name : " static_layer_0"
104- static_layer :
105- envoy :
106- resource_limits :
107- listener :
108- example_listener_name :
109- connection_limit : 10000
110- overload :
111- global_downstream_max_connections : 50000
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
1313 "time"
1414)
1515
16- var ProxiesToTest = []string {"traefik" , "nginx" }
16+ var ProxiesToTest = []string {"traefik" , "nginx" , "envoy" }
1717
1818const (
1919 EnvFile = ".env"
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ server {
2525 internal ;
2626 proxy_pass http ://tinyauth:3000 /api/auth/nginx;
2727 proxy_set_header x-original-url $scheme ://$http_host$request_uri ;
28+ proxy_set_header x-forwarded-proto $scheme ;
29+ proxy_set_header x-forwarded-host $host ;
30+ proxy_set_header x-forwarded-uri $request_uri ;
2831 }
2932
3033 location @tinyauth_login {
You can’t perform that action at this time.
0 commit comments