go-proxy/examples/basic_rewrite/README.md

12 lines
403 B
Markdown
Raw Normal View History

2023-04-24 19:53:37 +02:00
# Example: Basic rewriting
This example use the [`WithRewriteHosts()`](../middleware/rewrite_hosts.go) middleware to rewrite incoming requests based on static host matching rules.
# How to run
Run with `go run ./examples/basic_rewrite` then open your browser on theses 2 URLs:
- http://127.0.0.1:3000
- http://localhost:3000
You'll see that the two URLs are targeting two differents remote servers.