mirror of
https://github.com/actix/examples
synced 2025-01-22 22:05:57 +01:00
Listen to localhost instead of all network interfaces
This commit is contained in:
parent
e8582c14cc
commit
5e9e524f5a
@ -40,7 +40,7 @@ fn main() {
|
||||
))
|
||||
// register simple route, handle all methods
|
||||
.resource("/", |r| r.f(index))
|
||||
}).bind("0.0.0.0:8080")
|
||||
}).bind("127.0.0.1:8080")
|
||||
.unwrap()
|
||||
.start();
|
||||
|
||||
|
@ -38,7 +38,7 @@ fn main() {
|
||||
// start http server
|
||||
server::new(move || {
|
||||
App::new().resource("/", |r| r.method(http::Method::GET).with(index))
|
||||
}).bind("0.0.0.0:8080")
|
||||
}).bind("127.0.0.1:8080")
|
||||
.unwrap()
|
||||
.start();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user