release: WRNexusJS 0.5.10
This commit is contained in:
@@ -49,6 +49,19 @@ test("forward auth preserves intentional verifier redirects", () => {
|
||||
expect(denied.headers.has("location")).toBe(false);
|
||||
});
|
||||
|
||||
test("forward auth exposes the verifier public origin instead of its internal app port", () => {
|
||||
const redirected = forwardAuthFailure(
|
||||
new Response(null, {
|
||||
status: 302,
|
||||
headers: { location: "/sign-in?returnTo=%2Fadmin" },
|
||||
}),
|
||||
"http://127.0.0.1:85/api/verify",
|
||||
"http://sso.localhost",
|
||||
);
|
||||
|
||||
expect(redirected.headers.get("location")).toBe("http://sso.localhost/sign-in?returnTo=%2Fadmin");
|
||||
});
|
||||
|
||||
test("gateway reads and strips internal app diagnostics", async () => {
|
||||
const response = new Response("safe public error", {
|
||||
status: 500,
|
||||
|
||||
Reference in New Issue
Block a user