mirror of
https://github.com/horizon-rust/horizon-site.git
synced 2026-12-03 19:12:41 +07:00
[PR #15] [MERGED] Staff dashboards: /staff sign-in, password setup, sign-out; the API proxy to Kira #18
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
horizon-rust/horizon-site#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/horizon-rust/horizon-site/pull/15
Author: @ludovic111
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111
Base:
main← Head:feat/staff-pages📝 Commits (1)
513bac6Staff dashboards: /staff sign-in, password setup and sign-out; the API proxy to Kira📊 Changes
8 files changed (+361 additions, -4 deletions)
View changed files
📝
Caddyfile(+18 -0)📝
build.mjs(+5 -3)📝
public/robots.txt(+1 -0)📝
serve.mjs(+24 -1)➕
src/staff-api.js(+76 -0)➕
src/staff-page.js(+157 -0)➕
src/staff.html(+65 -0)📝
src/style.css(+15 -0)📄 Description
First site part of the staff dashboards (design v2, approved). Kira's side (accounts, sessions, API) is already merged and deployed in kira.
What it adds
/staff: sign in with the Discord username and the password each member sets for themselves./staff/setup#<token>: set it with the one-time link Kira DMs (/staff passwordon Discord). The token leaves the address bar at once. Sign out, and sign out everywhere./staff/teamand/staff/mod: the dashboard switch, shown to whoever holds both roles (and Ludovic). Someone without the role gets a refusal and a link to their own dashboard; the API refuses them too (403). The dashboards' content comes in the next PRs (S3–S5)./staff/api/*is reverse-proxied to Kira's existing public host withX-Staff-Proxy-Key(envSTAFF_PROXY_KEY, set on Railway from 1Password) and the client IP for rate limiting. Without the key Kira answers 404. No new port, no new public service: the session cookie (__Host-staff, HttpOnly, Secure, SameSite=Strict) stays first-party on playhorizon.dev./staffpages:noindex,no-store,no-referrer,Disallow: /staffin robots.txt, never in the sitemap.build.mjs: the import rewrite skipped hyphenated module names ("./staff-api.js"stayed unfingerprinted and 404'd).Tests
npm test: 49 pass.caddy validate: valid.scripts/staff-dev.mjsin kira): a wrong password is refused, sign in sets the cookie,meworks, sign out works, a Mod-only account is refused on the Team dashboard, the setup link works.~/builds/horizon-site/staff-shots/s1-*.png(login, wrong password, signed in, signed out, setup link, Mod refused on /staff/team).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.