Skip to content

Commit 752229a

Browse files
committed
fix: address review findings — i18n, a11y, proxy hardening, prop naming
1 parent 23ce5ed commit 752229a

15 files changed

Lines changed: 95 additions & 201 deletions

File tree

pnpm-lock.yaml

Lines changed: 31 additions & 140 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SEBT.EnrollmentChecker.Web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@tanstack/react-query": "^5.90.12",
2727
"@uswds/uswds": "^3.13.0",
2828
"i18next": "^25.7.3",
29-
"next": "16.0.8",
29+
"next": "16.1.7",
3030
"react": "19.2.1",
3131
"react-dom": "19.2.1",
3232
"react-i18next": "^16.5.0",
@@ -43,7 +43,7 @@
4343
"@types/react-dom": "^19",
4444
"@types/uuid": "^10.0.0",
4545
"eslint": "^9",
46-
"eslint-config-next": "16.0.8",
46+
"eslint-config-next": "16.1.7",
4747
"eslint-plugin-security": "^3.0.1",
4848
"jsdom": "^27.3.0",
4949
"msw": "^2.12.4",

src/SEBT.EnrollmentChecker.Web/src/app/api/enrollment/check/route.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ import { NextRequest, NextResponse } from 'next/server'
33

44
const BACKEND_URL = env.BACKEND_URL
55
const TIMEOUT_MS = 30_000
6+
const MAX_BODY_BYTES = 50_000
67

78
export async function POST(request: NextRequest): Promise<NextResponse> {
89
const controller = new AbortController()
910
const timeoutId = setTimeout(() => controller.abort(), TIMEOUT_MS)
1011

1112
try {
1213
const body = await request.text()
14+
if (body.length > MAX_BODY_BYTES) {
15+
return NextResponse.json({ error: 'Request too large' }, { status: 413 })
16+
}
1317
const response = await fetch(`${BACKEND_URL}/api/enrollment/check`, {
1418
method: 'POST',
1519
headers: {

0 commit comments

Comments
 (0)