Add home route
This commit is contained in:
parent
e1eb64f27c
commit
f21e40d804
@ -1,6 +1,6 @@
|
|||||||
use actix::Actor;
|
use actix::Actor;
|
||||||
use actix_identity::{CookieIdentityPolicy, IdentityService};
|
use actix_identity::{CookieIdentityPolicy, IdentityService};
|
||||||
use actix_web::{App, get, HttpServer, web};
|
use actix_web::{App, get, HttpResponse, HttpServer, web};
|
||||||
use actix_web::cookie::SameSite;
|
use actix_web::cookie::SameSite;
|
||||||
use actix_web::cookie::time::Duration;
|
use actix_web::cookie::time::Duration;
|
||||||
use actix_web::middleware::Logger;
|
use actix_web::middleware::Logger;
|
||||||
@ -87,6 +87,10 @@ async fn main() -> std::io::Result<()> {
|
|||||||
.wrap(AuthMiddleware {})
|
.wrap(AuthMiddleware {})
|
||||||
.wrap(IdentityService::new(policy))
|
.wrap(IdentityService::new(policy))
|
||||||
|
|
||||||
|
// main route
|
||||||
|
.route("/", web::get()
|
||||||
|
.to(|| async { HttpResponse::Found().append_header(("Location", "/settings")).finish() }))
|
||||||
|
|
||||||
// health route
|
// health route
|
||||||
.service(health)
|
.service(health)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user