* Add --bind option
* Changed default bind address to localhost * Fix wrong log text about binding address
This commit is contained in:
parent
73ec59ccda
commit
cc2dd1e1fe
2 changed files with 9 additions and 4 deletions
|
@ -58,7 +58,8 @@ async fn main() -> std::io::Result<()> {
|
|||
.init();
|
||||
|
||||
log::info!(
|
||||
"MicroBin starting on http://127.0.0.1:{}",
|
||||
"MicroBin starting on http://{}:{}",
|
||||
ARGS.bind.to_string(),
|
||||
ARGS.port.to_string()
|
||||
);
|
||||
|
||||
|
@ -97,7 +98,7 @@ async fn main() -> std::io::Result<()> {
|
|||
HttpAuthentication::basic(util::auth::auth_validator),
|
||||
))
|
||||
})
|
||||
.bind(format!("0.0.0.0:{}", ARGS.port.to_string()))?
|
||||
.bind((ARGS.bind, ARGS.port))?
|
||||
.workers(ARGS.threads as usize)
|
||||
.run()
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue