Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Envoy reverse proxy (Proxy Front) + URL rewrite #3977

Closed
welsonplay opened this issue Jul 28, 2018 · 2 comments
Closed

Envoy reverse proxy (Proxy Front) + URL rewrite #3977

welsonplay opened this issue Jul 28, 2018 · 2 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@welsonplay
Copy link

Envoy is running on port 80, and I'm using it to reverse proxy (Front Proxy) URLs with path /foo to port 3200 this way:

static_resources:
  listeners:
  - address:
      socket_address:
        address: 0.0.0.0
        port_value: 80
    filter_chains:
    - filters:
      - name: envoy.http_connection_manager
        config:
          codec_type: auto
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
            - name: service
              domains:
              - "*"
              routes:
              - match:
                  prefix: "/"
                route:
                  prefix_rewrite: "/"
                  cluster: service1
          http_filters:
          - name: envoy.router
            config: {}
  clusters:
  - name: service1
    connect_timeout: 0.25s
    type: strict_dns
    lb_policy: ROUND_ROBIN
    hosts:
    - socket_address:
        address:[Ip_My_Server]
        port_value: 3200

This works fine, but I have an application on port 3200, for which I don't want the initial /foo to be sent to. That is - when I access http://localhost/foo/bar, I want only /bar to be the path as received by the app.

In Nginx I need to do only this configuration:

location  /foo {
  rewrite /foo/(.*) /$1  break;
  proxy_pass         http://[Ip_My_Server]:3200;
  proxy_redirect     off;
  proxy_set_header   Host $host;
}

How can I make this same setting in Envoy?

@mattklein123 mattklein123 added the question Questions that are neither investigations, bugs, nor enhancements label Jul 28, 2018
@stale
Copy link

stale bot commented Aug 27, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 27, 2018
@stale
Copy link

stale bot commented Sep 3, 2018

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

2 participants