2020-07-31 20:30:20 +03:00
|
|
|
https://example.com {
|
2022-05-06 17:50:26 +03:00
|
|
|
reverse_proxy /path https://localhost:54321 {
|
|
|
|
header_up Host {upstream_hostport}
|
|
|
|
header_up Foo bar
|
|
|
|
|
|
|
|
method GET
|
|
|
|
rewrite /rewritten?uri={uri}
|
2020-10-30 21:05:21 +03:00
|
|
|
|
2023-02-26 03:34:27 +03:00
|
|
|
request_buffers 4KB
|
2020-10-30 21:05:21 +03:00
|
|
|
|
2020-07-31 20:30:20 +03:00
|
|
|
transport http {
|
2020-11-03 00:59:02 +03:00
|
|
|
read_buffer 10MB
|
|
|
|
write_buffer 20MB
|
|
|
|
max_response_header 30MB
|
|
|
|
dial_timeout 3s
|
|
|
|
dial_fallback_delay 5s
|
|
|
|
response_header_timeout 8s
|
|
|
|
expect_continue_timeout 9s
|
2022-03-07 03:43:39 +03:00
|
|
|
resolvers 8.8.8.8 8.8.4.4
|
2020-11-03 00:59:02 +03:00
|
|
|
|
2020-07-31 20:30:20 +03:00
|
|
|
versions h2c 2
|
|
|
|
compression off
|
2020-10-30 21:05:21 +03:00
|
|
|
max_conns_per_host 5
|
2021-06-16 00:02:22 +03:00
|
|
|
keepalive_idle_conns_per_host 2
|
2021-11-24 09:32:25 +03:00
|
|
|
keepalive_interval 30s
|
2023-02-06 22:44:11 +03:00
|
|
|
|
2022-07-08 20:04:22 +03:00
|
|
|
tls_renegotiation freely
|
|
|
|
tls_except_ports 8181 8182
|
2020-07-31 20:30:20 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----------
|
|
|
|
{
|
|
|
|
"apps": {
|
|
|
|
"http": {
|
|
|
|
"servers": {
|
|
|
|
"srv0": {
|
|
|
|
"listen": [
|
|
|
|
":443"
|
|
|
|
],
|
|
|
|
"routes": [
|
|
|
|
{
|
|
|
|
"match": [
|
|
|
|
{
|
|
|
|
"host": [
|
|
|
|
"example.com"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"handle": [
|
|
|
|
{
|
|
|
|
"handler": "subroute",
|
|
|
|
"routes": [
|
|
|
|
{
|
|
|
|
"handle": [
|
|
|
|
{
|
|
|
|
"handler": "reverse_proxy",
|
|
|
|
"headers": {
|
|
|
|
"request": {
|
|
|
|
"set": {
|
2022-05-06 17:50:26 +03:00
|
|
|
"Foo": [
|
|
|
|
"bar"
|
2020-07-31 20:30:20 +03:00
|
|
|
],
|
2022-05-06 17:50:26 +03:00
|
|
|
"Host": [
|
|
|
|
"{http.reverse_proxy.upstream.hostport}"
|
2020-07-31 20:30:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-02-26 03:34:27 +03:00
|
|
|
"request_buffers": 4000,
|
2022-05-06 17:50:26 +03:00
|
|
|
"rewrite": {
|
|
|
|
"method": "GET",
|
|
|
|
"uri": "/rewritten?uri={http.request.uri}"
|
|
|
|
},
|
2020-07-31 20:30:20 +03:00
|
|
|
"transport": {
|
|
|
|
"compression": false,
|
2020-11-03 00:59:02 +03:00
|
|
|
"dial_fallback_delay": 5000000000,
|
|
|
|
"dial_timeout": 3000000000,
|
|
|
|
"expect_continue_timeout": 9000000000,
|
2021-06-16 00:02:22 +03:00
|
|
|
"keep_alive": {
|
2021-11-24 09:32:25 +03:00
|
|
|
"max_idle_conns_per_host": 2,
|
|
|
|
"probe_interval": 30000000000
|
2021-06-16 00:02:22 +03:00
|
|
|
},
|
2020-10-30 21:05:21 +03:00
|
|
|
"max_conns_per_host": 5,
|
2020-11-03 00:59:02 +03:00
|
|
|
"max_response_header_size": 30000000,
|
2020-07-31 20:30:20 +03:00
|
|
|
"protocol": "http",
|
2020-11-03 00:59:02 +03:00
|
|
|
"read_buffer_size": 10000000,
|
2022-03-07 03:43:39 +03:00
|
|
|
"resolver": {
|
|
|
|
"addresses": [
|
|
|
|
"8.8.8.8",
|
|
|
|
"8.8.4.4"
|
|
|
|
]
|
|
|
|
},
|
2020-11-03 00:59:02 +03:00
|
|
|
"response_header_timeout": 8000000000,
|
2022-06-10 18:33:35 +03:00
|
|
|
"tls": {
|
2022-06-20 20:51:42 +03:00
|
|
|
"except_ports": [
|
|
|
|
"8181",
|
|
|
|
"8182"
|
|
|
|
],
|
2022-06-10 18:33:35 +03:00
|
|
|
"renegotiation": "freely"
|
|
|
|
},
|
2020-07-31 20:30:20 +03:00
|
|
|
"versions": [
|
|
|
|
"h2c",
|
|
|
|
"2"
|
2020-11-03 00:59:02 +03:00
|
|
|
],
|
|
|
|
"write_buffer_size": 20000000
|
2020-07-31 20:30:20 +03:00
|
|
|
},
|
|
|
|
"upstreams": [
|
|
|
|
{
|
|
|
|
"dial": "localhost:54321"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"match": [
|
|
|
|
{
|
|
|
|
"path": [
|
|
|
|
"/path"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"terminal": true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|