Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Changing request route to another backend api doesn't work #157

Closed
SMakhrov opened this issue Apr 28, 2021 · 2 comments · Fixed by #160
Closed

Changing request route to another backend api doesn't work #157

SMakhrov opened this issue Apr 28, 2021 · 2 comments · Fixed by #160

Comments

@SMakhrov
Copy link

SMakhrov commented Apr 28, 2021

Due to no answers in this ticket #149 and at discussion: https://github.com/tetratelabs/proxy-wasm-go-sdk/discussions/148 I had to up this problem again.

Problem definition:
I want to change backend api address from localhost:8099 (web_service) to localhost:8100 (web_service_canary).

What was ​tried:
According to tip from #149 I have tried to use header :authority. But it doesn't work.

My code is presented here:
https://github.com/SMakhrov/proxy-wasm-go-sdk/tree/dev/feature/example_change_authority/examples/change_authority

For run use:

make build.example name=change_authority && make run name=change_authority
curl http://localhost:18000

Please help anyone.

@mathetake
Copy link
Member

As I sadi, this is more about Envoy configuration rather than SDK nor Proxy-Wasm at all. You'd better learn Envoy basic before dive deeper into Wasm world which is highly advanced field.

Having said that, I added the example in #160 so I could save others like you in the future. Thanks!

@SMakhrov
Copy link
Author

@mathetake thank you so much!!! I will try your example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants