[PR #43] [MERGED] Forward Origin to the mod registry (submits were refused) #44

Closed
opened 2026-11-03 04:02:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-site/pull/43
Author: @ludovic111
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/mods-proxy-origin


📝 Commits (1)

  • a393ac8 Forward Origin to the mod registry

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 app/api/mods/[...path]/route.ts (+1 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Every mod submission on playhorizon.dev/mods/submit fails with "send it from the registry's pages" (reported on Discord by a creator submitting a native mod).

Cause: the registry (horizon-mod-registry, signed_in_here) accepts a change only when its Origin is REGISTRY_PUBLIC_URL's origin. The site's /api/mods proxy didn't include origin in its forwarded headers, so the registry never saw it.

Reproduced on live:

  • curl -X POST -H 'Origin: https://playhorizon.dev' https://playhorizon.dev/api/mods/submit → 403 send it from the registry's pages.
  • The same request with another origin → 403 Requests from other sites are refused. That is the proxy's own same-site check, which stays.

Fix: forward origin, as app/staff/api already does. The proxy checks same-site before forwarding, so a foreign origin still never reaches the registry.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon-site/pull/43 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mods-proxy-origin` --- ### 📝 Commits (1) - [`a393ac8`](https://github.com/horizon-rust/horizon-site/commit/a393ac8026dd9fbf3af4980d9797c55aba9c0d57) Forward Origin to the mod registry ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/api/mods/[...path]/route.ts` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Every mod submission on playhorizon.dev/mods/submit fails with "send it from the registry's pages" (reported on Discord by a creator submitting a native mod). **Cause:** the registry (`horizon-mod-registry`, `signed_in_here`) accepts a change only when its `Origin` is `REGISTRY_PUBLIC_URL`'s origin. The site's `/api/mods` proxy didn't include `origin` in its forwarded headers, so the registry never saw it. Reproduced on live: - `curl -X POST -H 'Origin: https://playhorizon.dev' https://playhorizon.dev/api/mods/submit` → 403 `send it from the registry's pages`. - The same request with another origin → 403 `Requests from other sites are refused.` That is the proxy's own same-site check, which stays. **Fix:** forward `origin`, as `app/staff/api` already does. The proxy checks same-site before forwarding, so a foreign origin still never reaches the registry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:02:37 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-site#44
No description provided.