Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
justlorain committed Jul 19, 2024
1 parent 8b0854a commit c92b929
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ func main() {
}
```

| Configuration | Default | Description |
|----------------|---------------------------|------------------------------|
| `WithDirector` | `nil` | customize the forward header |
| `WithDialer` | `gorillaws.DefaultDialer` | for dialer customization |
| `WithUpgrader` | `hzws.HertzUpgrader` | for upgrader customization |
| Configuration | Default | Description |
|--------------------|---------------------------|-------------------------------------------------------------|
| `WithDirector` | `nil` | customize the forward header |
| `WithDialer` | `gorillaws.DefaultDialer` | for dialer customization |
| `WithUpgrader` | `hzws.HertzUpgrader` | for upgrader customization |
| `WithDynamicRoute` | `false` | enable dynamic route (proxy url = handler url + target url) |

### More info
See [example](https://github.com/cloudwego/hertz-examples)
2 changes: 1 addition & 1 deletion ws_reverse_proxy_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func WithUpgrader(upgrader *hzws.HertzUpgrader) Option {
}

// WithDynamicRoute enable dynamic route
// backend url = handler url + proxy url
// proxy url = handler url + target url
func WithDynamicRoute() Option {
return func(o *Options) {
o.DynamicRoute = true
Expand Down

0 comments on commit c92b929

Please sign in to comment.