mirror of
https://forge.pointfixe.fr/hubert/gitust.git
synced 2026-02-04 16:37:30 +01:00
save
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -155,13 +155,16 @@ async fn main() -> std::io::Result<()> {
|
||||
env_logger::from_env(Env::default().default_filter_or("info")).init();
|
||||
HttpServer::new(|| {
|
||||
let auth = HttpAuthentication::basic(basic_auth_validator);
|
||||
let gitust = Gitust {
|
||||
repo_root_path: "/home/hubert/gitust".to_string(),
|
||||
session_key: "oWe0ait9bi2Ohyiod2eeXirao1Oochie".to_string(),
|
||||
};
|
||||
let session_key = (&gitust.session_key).as_bytes();
|
||||
App::new()
|
||||
.data(Gitust {
|
||||
repo_root_path: "/home/hubert/gitust".to_string(),
|
||||
})
|
||||
.wrap(Logger::default())
|
||||
// .wrap(Logger::new("%a %{User-Agent}i"))
|
||||
.wrap(CookieSession::signed(&[0; 32]).secure(false))
|
||||
.wrap(CookieSession::signed(session_key).secure(false))
|
||||
.data(gitust)
|
||||
.service(hello)
|
||||
.service(echo)
|
||||
.service(hello_test)
|
||||
|
||||
Reference in New Issue
Block a user