mirror of
https://github.com/horizon-rust/horizon-site.git
synced 2026-12-03 19:12:41 +07:00
[PR #32] [MERGED] Staff proxy: forward Origin so staff sign-in and setup links work #34
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#34
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/32
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111
Base:
main← Head:fix/staff-proxy-origin📝 Commits (1)
4035568Staff proxy: forward the browser's Origin to Kira📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
app/staff/api/[...path]/route.ts(+1 -1)📄 Description
Since the Next.js rebuild (
2a2b357) the/staff/api/*proxy no longer forwards the browser'sOrigin. Kira's staff API (src/staff-http.js) answers 403 "Wrong origin." to every POST without the site's Origin, so password setup links, sign-in, every dashboard write and the/applyform were all broken (a staff member reported the setup link).Fix: add
originto the forwarded headers. The proxy already refuses cross-site writes (sameSite) before forwarding.Tested locally against Kira's staff dev API (fake data): before,
setup/peek→ 403 "Wrong origin."; after, the setup link in headless Chromium sets the password and lands signed in on/staff/team; a POST with a foreign Origin is still refused (403).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.