mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-03-15 11:12:02 +00:00
fix: fix envoy tests
This commit is contained in:
@@ -40,7 +40,7 @@ static_resources:
|
|||||||
"@type": "type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz"
|
"@type": "type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz"
|
||||||
transport_api_version: "v3"
|
transport_api_version: "v3"
|
||||||
http_service:
|
http_service:
|
||||||
path_prefix: "/api/auth/envoy"
|
path_prefix: "/api/auth/envoy?path="
|
||||||
server_uri:
|
server_uri:
|
||||||
uri: "tinyauth:3000"
|
uri: "tinyauth:3000"
|
||||||
cluster: "tinyauth"
|
cluster: "tinyauth"
|
||||||
@@ -51,10 +51,13 @@ static_resources:
|
|||||||
- exact: "authorization"
|
- exact: "authorization"
|
||||||
- exact: "accept"
|
- exact: "accept"
|
||||||
- exact: "cookie"
|
- exact: "cookie"
|
||||||
- exact: "location"
|
|
||||||
headers_to_add:
|
headers_to_add:
|
||||||
- key: "X-Forwarded-Proto"
|
- key: "x-forwarded-proto"
|
||||||
value: "%REQ(:SCHEME)%"
|
value: "%REQ(:SCHEME)%"
|
||||||
|
- key: "x-forwarded-host"
|
||||||
|
value: "%REQ(:AUTHORITY)%"
|
||||||
|
- key: "x-forwarded-uri"
|
||||||
|
value: "%REQ(:PATH)%"
|
||||||
authorization_response:
|
authorization_response:
|
||||||
allowed_upstream_headers:
|
allowed_upstream_headers:
|
||||||
patterns:
|
patterns:
|
||||||
@@ -62,9 +65,11 @@ static_resources:
|
|||||||
allowed_client_headers:
|
allowed_client_headers:
|
||||||
patterns:
|
patterns:
|
||||||
- exact: "set-cookie"
|
- exact: "set-cookie"
|
||||||
|
- exact: "location"
|
||||||
allowed_client_headers_on_success:
|
allowed_client_headers_on_success:
|
||||||
patterns:
|
patterns:
|
||||||
- exact: "set-cookie"
|
- exact: "set-cookie"
|
||||||
|
- exact: "location"
|
||||||
failure_mode_allow: false
|
failure_mode_allow: false
|
||||||
- name: "envoy.filters.http.router"
|
- name: "envoy.filters.http.router"
|
||||||
typed_config:
|
typed_config:
|
||||||
@@ -98,14 +103,3 @@ static_resources:
|
|||||||
socket_address:
|
socket_address:
|
||||||
address: "tinyauth"
|
address: "tinyauth"
|
||||||
port_value: 3000
|
port_value: 3000
|
||||||
layered_runtime:
|
|
||||||
layers:
|
|
||||||
- name: "static_layer_0"
|
|
||||||
static_layer:
|
|
||||||
envoy:
|
|
||||||
resource_limits:
|
|
||||||
listener:
|
|
||||||
example_listener_name:
|
|
||||||
connection_limit: 10000
|
|
||||||
overload:
|
|
||||||
global_downstream_max_connections: 50000
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ProxiesToTest = []string{"traefik", "nginx"}
|
var ProxiesToTest = []string{"traefik", "nginx", "envoy"}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
EnvFile = ".env"
|
EnvFile = ".env"
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ server {
|
|||||||
internal;
|
internal;
|
||||||
proxy_pass http://tinyauth:3000/api/auth/nginx;
|
proxy_pass http://tinyauth:3000/api/auth/nginx;
|
||||||
proxy_set_header x-original-url $scheme://$http_host$request_uri;
|
proxy_set_header x-original-url $scheme://$http_host$request_uri;
|
||||||
|
proxy_set_header x-forwarded-proto $scheme;
|
||||||
|
proxy_set_header x-forwarded-host $host;
|
||||||
|
proxy_set_header x-forwarded-uri $request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @tinyauth_login {
|
location @tinyauth_login {
|
||||||
|
|||||||
Reference in New Issue
Block a user