mirror of
https://github.com/hanzoai/oxy.git
synced 2026-09-30 23:42:31 +00:00
Merge pull request #15 from ArturKlajnerok/master
Fixed readme proxy sample
This commit is contained in:
@@ -33,6 +33,7 @@ Simple reverse proxy
|
||||
import (
|
||||
"net/http"
|
||||
"github.com/mailgun/oxy/forward"
|
||||
"github.com/mailgun/oxy/testutils"
|
||||
)
|
||||
|
||||
// Forwards incoming requests to whatever location URL points to, adds proper forwarding headers
|
||||
@@ -47,7 +48,7 @@ redirect := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
// that's it! our reverse proxy is ready!
|
||||
s := &http.Server{
|
||||
Addr: ":8080",
|
||||
Handler: myHandler,
|
||||
Handler: redirect,
|
||||
}
|
||||
s.ListenAndServe()
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user