Is your feature request related to a problem? Please describe.
I was not aware that is is possible to bind to a specific interface address (typically localhost for security reasons) and have been using allow_ip() as an inferior substitute.
Describe why the feature or enhancement you are proposing fits the library.
The feature is supported already but not documented.
Describe the solution you'd like
Document bind_address() in README.md similar to port() and bind_socket()
Describe alternatives you've considered
It would be nice if bind_address() alternately accepted an address in the same IP string format used by allow_ip() rather than forcing the caller to construct a struct sockaddr.
Additional context
|
create_webserver& bind_address(const struct sockaddr* bind_address) { |
|
_bind_address = bind_address; |
|
return *this; |
|
} |
Is your feature request related to a problem? Please describe.
I was not aware that is is possible to bind to a specific interface address (typically localhost for security reasons) and have been using
allow_ip()as an inferior substitute.Describe why the feature or enhancement you are proposing fits the library.
The feature is supported already but not documented.
Describe the solution you'd like
Document
bind_address()in README.md similar toport()andbind_socket()Describe alternatives you've considered
It would be nice if
bind_address()alternately accepted an address in the same IP string format used byallow_ip()rather than forcing the caller to construct astruct sockaddr.Additional context
libhttpserver/src/httpserver/create_webserver.hpp
Lines 121 to 124 in 1b5fe8f