Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app-next/src/config/pathnames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export const pathnames = {
fr: "/documentation",
de: "/dokumentation",
},
"/api": {
en: "/api",
nl: "/api",
fr: "/api",
de: "/api",
"/apis": {
en: "/apis",
nl: "/apis",
fr: "/apis",
de: "/apis",
},
"/contribute": {
en: "/contribute",
Expand Down
5 changes: 5 additions & 0 deletions app-next/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ const intlMiddleware = createMiddleware(routing);
export function proxy(request: NextRequest) {
const { pathname, searchParams } = request.nextUrl;

// Bypass middleware for direct API calls to the backend
if (pathname === "/api" || pathname.startsWith("/api/")) {
return NextResponse.next();
}

// Handle legacy /search redirects BEFORE locale processing
if (pathname === "/search") {
const type = searchParams.get("type");
Expand Down