-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add server bind option #190
Conversation
update from remote master
…rver handle path and Bind Address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! A few suggestions below.
cmd/podsync/server.go
Outdated
srv.Addr = fmt.Sprintf(":%d", port) | ||
log.Debugf("using address: %s", srv.Addr) | ||
srv.Addr = fmt.Sprintf("%s:%d", bindAddress, port) | ||
//srv.Addr = fmt.Sprintf("{{$bindAddress:$port}}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK ,my bad miss that
# Bind a specific IP addresses for server ,"*": bind all IP addresses which is default option, localhost or 127.0.0.1 bind a single IPv4 address | ||
bind_address = "172.20.10.2" | ||
# Specify path for reverse proxy and only [A-Za-z0-9] | ||
path = "test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update the comment that this is related to URL path specifically? Possibly with en example.
(I was confused for a moment why we need both path
and data_dir
until I referred to Go's documentation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
Add Server.path and Server.bindAddress two options to special http server handle path and Bind Address.