Spaces:
Paused
Paused
Download src/proxy.ts from igorkurgin/omniroute: direct link, hf CLI and curl.
- Browser
- Download file 459 Bytes
-
https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/src/proxy.ts
- Command line
-
hf download hf://spaces/igorkurgin/omniroute/src/proxy.ts
-
curl -L -o proxy.ts https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/src/proxy.ts
459 Bytes
| import type { NextRequest } from "next/server"; | |
| import { runAuthzPipeline } from "./server/authz/pipeline"; | |
| export async function proxy(request: NextRequest) { | |
| return runAuthzPipeline(request, { enforce: true }); | |
| } | |
| export const config = { | |
| matcher: [ | |
| "/", | |
| "/dashboard/:path*", | |
| "/api/:path*", | |
| "/v1/:path*", | |
| "/v1", | |
| "/chat/:path*", | |
| "/responses/:path*", | |
| "/responses", | |
| "/codex/:path*", | |
| "/codex", | |
| "/models", | |
| ], | |
| }; | |