Skip to content

Commit 4295751

Browse files
committed
update to middleware.ts file
Signed-off-by: hemahg <[email protected]>
1 parent 9c6217c commit 4295751

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/proxy.ts renamed to ui/middleware.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ const protectedPathnameRegex = RegExp(
4242
"i",
4343
);
4444

45-
export default async function proxy(req: NextRequest) {
45+
export default async function middleware(req: NextRequest) {
4646
/*
4747
* Next.js middleware doesn't support reading files, so here we make a (cached)
4848
* call to the /config endpoint within the same application :(
4949
*/
50-
let oidcEnabled = await fetch(`http://127.0.0.1:${process.env.PORT}/config`, {
50+
51+
let oidcEnabled = await fetch(`http://127.0.0.1:${process.env.PORT}/config`, {
5152
cache: "force-cache",
5253
})
5354
.then((cfg) => cfg.json())

0 commit comments

Comments
 (0)