feat : 6 astra improve it
CI / Verify and audit (push) Successful in 2m33s
CI / Build, scan and deploy immutable images (push) Failing after 1m29s

This commit is contained in:
2026-09-22 18:28:18 +07:00 Unverified
parent 88afa8e947
commit 87e6bcd96f
56 changed files with 1351 additions and 511 deletions
+14 -7
View File
@@ -1,3 +1,5 @@
import { errorResponse } from "@/lib/security/http";
import { limitRequest, trustedClientAddress } from "@/lib/security/rate-limit";
import { connection } from "next/server";
import { normalizeDeploymentId } from "@/lib/deployment/version";
@@ -5,12 +7,17 @@ import { createEventStream, eventStreamHeaders } from "@/lib/events/sse";
export async function GET(request: Request) {
await connection();
const deploymentId =
normalizeDeploymentId(process.env.NEXT_DEPLOYMENT_ID) ?? "development";
const channel = createEventStream({ signal: request.signal });
channel.sendNamed("deployment", deploymentId);
try {
await limitRequest("stream-open", trustedClientAddress(request.headers), 60);
const deploymentId =
normalizeDeploymentId(process.env.NEXT_DEPLOYMENT_ID) ?? "development";
const channel = createEventStream({ signal: request.signal });
channel.sendNamed("deployment", deploymentId);
return new Response(channel.stream, {
headers: eventStreamHeaders(),
});
return new Response(channel.stream, {
headers: eventStreamHeaders(),
});
} catch (cause) {
return errorResponse(cause);
}
}