App: / leads to the back office; lannadesk.com is the website now
CI / secret scan (push) Successful in 5s
CI / fmt, clippy, tests (push) Successful in 43s
CI / release (push) Skipped

lannadesk.com is Lanna Desk's own static website (B4L/lannadesk-web,
cnx-network-clan PR #163, deployed), and this app is app.lannadesk.com.
The landing page the app served at `/` goes (templates/landing.html,
static/landing.css): `/` now redirects to the back office, /desk. The
logo files in static/brand/ stay, the website copies them.

The public URL in README, PLAN, config.rs, the agreement PDF's comment and
the release notes is app.lannadesk.com.

Checks: fmt, clippy, 109 unit and 57 integration tests (`/` leads to
/desk, signed in or not).
This commit is contained in:
grabowski committed 2026-11-21 20:58:08 +07:00
1 parent eafe918bcc
commit 39980694f6
11 files changed
+29 -397

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ pub struct Signed<'a> {
pub record: &'a str,
/// "Nov 20, 2026, 14:05 (Chiang Mai time)"
pub at: &'a str,
/// "client link 12 at https://lannadesk.com"
/// "client link 12 at https://app.lannadesk.com"
pub through: &'a str,
pub ip: &'a str,
pub user_agent: &'a str,
+1 -1
View File
@@ -4,7 +4,7 @@
//! | Variable | Meaning |
//! | -------------------------------- | ------------------------------------------------ |
//! | `VISA_LISTEN` | address to listen on, default 127.0.0.1:8040 |
//! | `VISA_PUBLIC_URL` | https://lannadesk.com (login redirects) |
//! | `VISA_PUBLIC_URL` | https://app.lannadesk.com (login redirects) |
//! | `VISA_DATABASE_URL` | postgres://user@host/db |
//! | `VISA_DATABASE_PASSWORD_FILE` | the role's password (else credential `db-password`) |
//! | `VISA_OIDC_ISSUER` | https://id.cnx.network/oauth2/openid/visa-web |
+7 -14
View File
@@ -390,8 +390,9 @@ pub fn router(st: Arc<AppState>) -> Router {
.with_state(st)
}
/// Paths open without a session: the public page at `/`, and the client's
/// pages (`/c/<token>`, which check their link themselves) among them.
/// Paths open without a session: `/`, which leads to the back office, and the
/// client's pages (`/c/<token>`, which check their link themselves) among
/// them.
fn is_public(path: &str) -> bool {
matches!(
path,
@@ -705,18 +706,10 @@ pub fn message(
/// The back office's first page, the deadlines; `/` is the public page.
pub const HOME: &str = "/desk";
/// The address on the public page that people write to.
pub const CONTACT: &str = "contact@lannadesk.com";
/// lannadesk.com's public page: what Lanna Desk does and how to reach it,
/// with the way into the back office. Open without a session.
async fn landing(State(st): State<Arc<AppState>>) -> Response {
render(
&st,
"landing.html",
context! { v => embedded::STATIC_HASH, home => HOME, contact => CONTACT },
StatusCode::OK,
)
/// `/` leads to the back office. Lanna Desk's public website is
/// lannadesk.com (B4L/lannadesk-web); this app is app.lannadesk.com.
async fn landing() -> Response {
Redirect::to(HOME).into_response()
}
pub fn not_found_page(st: &AppState) -> Response {