From 5e9e524f5a7041329b133a59182649ca5efe0719 Mon Sep 17 00:00:00 2001 From: Pradip Caulagi Date: Thu, 31 May 2018 22:05:20 +0200 Subject: [PATCH] Listen to localhost instead of all network interfaces --- redis-session/src/main.rs | 2 +- template_askama/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redis-session/src/main.rs b/redis-session/src/main.rs index e996814d..7bdd744b 100644 --- a/redis-session/src/main.rs +++ b/redis-session/src/main.rs @@ -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(); diff --git a/template_askama/src/main.rs b/template_askama/src/main.rs index 08683ad9..4a34abf1 100644 --- a/template_askama/src/main.rs +++ b/template_askama/src/main.rs @@ -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();