Accounts 1.7.1, Website 1.0.2, Events 3.7.1: link right after an install; Preview behind the proxy
Found installing the Website for cross-demo2. - All three: a connect involving an install that isn't in the cached copy of the Hub's list yet asks the Hub for a fresh list (one heartbeat, at most once a minute) instead of refusing. A new Website's admin couldn't sign in for up to 30 minutes. - Accounts: a heartbeat on every start. - Website: /admin links to Accounts on the spot (at most every 15 s), one connect to Accounts at a time, and the problem page says "not linked yet" (ACCOUNTS_NOT_LINKED). Preview redirected to the server's own http://localhost:<web port>: the preview routes now answer with a relative Location. - Events: a new Website can connect for the event feed straight away. - docs: VERSIONS, changelogs, WHATS-NEW. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
/**
|
||||
* 1.0.2: a 303 to a page of this site with a relative Location ("/admin"), so the browser stays on the
|
||||
* address it's on. `new URL(path, request.url)` used the address the request reached Next.js on,
|
||||
* which behind the proxy is the server's own (http://localhost:<web port>): Preview sent admins there.
|
||||
*/
|
||||
export function localRedirect(path: string): NextResponse {
|
||||
if (!path.startsWith("/") || path.startsWith("//")) throw new Error(`Not a path on this site: ${path}`);
|
||||
return new NextResponse(null, { status: 303, headers: { Location: path } });
|
||||
}
|
||||
Reference in New Issue
Block a user