summaryrefslogtreecommitdiffstats
path: root/webd
diff options
context:
space:
mode:
Diffstat (limited to 'webd')
-rw-r--r--webd/src/session.rs7
-rw-r--r--webd/zagan-bet-webd.service20
2 files changed, 26 insertions, 1 deletions
diff --git a/webd/src/session.rs b/webd/src/session.rs
index 8a20721..3b34f47 100644
--- a/webd/src/session.rs
+++ b/webd/src/session.rs
@@ -575,7 +575,12 @@ mod tests {
575 let id = "a".repeat(64); 575 let id = "a".repeat(64);
576 assert_eq!( 576 assert_eq!(
577 cookie_id(&format!("other=1; {COOKIE_NAME}={id}; theme=dark")), 577 cookie_id(&format!("other=1; {COOKIE_NAME}={id}; theme=dark")),
578 Some(id) 578 Some(id.clone())
579 );
580 assert_eq!(
581 cookie_id(&format!("{HOST_COOKIE_NAME}={id}")),
582 Some(id),
583 "the secure __Host- name is accepted"
579 ); 584 );
580 assert_eq!(cookie_id(&format!("{COOKIE_NAME}=short")), None); 585 assert_eq!(cookie_id(&format!("{COOKIE_NAME}=short")), None);
581 assert_eq!(cookie_id("other=1"), None); 586 assert_eq!(cookie_id("other=1"), None);
diff --git a/webd/zagan-bet-webd.service b/webd/zagan-bet-webd.service
new file mode 100644
index 0000000..58bec71
--- /dev/null
+++ b/webd/zagan-bet-webd.service
@@ -0,0 +1,20 @@
1[Unit]
2Description=zagan-bet browser gateway
3After=network-online.target
4Wants=network-online.target
5
6[Service]
7Type=simple
8User=zagan
9Group=zagan
10EnvironmentFile=/etc/zagan-bet-webd.env
11ExecStart=/usr/local/bin/zagan-bet-webd
12Restart=on-failure
13RestartSec=2
14NoNewPrivileges=true
15PrivateTmp=true
16ProtectSystem=strict
17ProtectHome=true
18
19[Install]
20WantedBy=multi-user.target