1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

add HttpServer::server_hostname method

This commit is contained in:
Nikolay Kim
2017-12-26 14:36:03 -08:00
parent cce9c68a10
commit dd3a2aa68a
3 changed files with 22 additions and 11 deletions

View File

@ -87,8 +87,7 @@ fn main() {
.resource("/", |r| r.method(Method::GET).f(|req| {
println!("{:?}", req);
httpcodes::HTTPFound
.build()
HttpResponse::Found()
.header("LOCATION", "/index.html")
.finish()
})))