Skip to content

Instantly share code, notes, and snippets.

@halvards
Created December 20, 2019 12:18
Show Gist options
  • Save halvards/1272ad08e1a2b8120f802ef63335c1b5 to your computer and use it in GitHub Desktop.
Save halvards/1272ad08e1a2b8120f802ef63335c1b5 to your computer and use it in GitHub Desktop.
Static Envoy configuration for reverse proxy from localhost:80 to localhost:8080
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
static_resources:
listeners:
- address:
socket_address:
address: 127.0.0.1
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: local
http_filters:
- name: envoy.router
typed_config: {}
clusters:
- name: local
connect_timeout: 0.25s
type: strict_dns
dns_lookup_family: v4_only
lb_policy: round_robin
http2_protocol_options: {}
load_assignment:
cluster_name: local
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: localhost
port_value: 8080
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 127.0.0.1
port_value: 8001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment