From 682ed6c94f8ec37d0ef7c914df3696b0c694d8c2 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Mon, 22 May 2023 16:19:15 +0200 Subject: [PATCH] docs: backup ./apps/login/.env.local --- .gitignore | 1 + CONTRIBUTING.md | 4 ++++ apps/login/middleware.ts | 12 ++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 apps/login/middleware.ts diff --git a/.gitignore b/.gitignore index caa2adbb0f1..42a5cee25e2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ dist dist-ssr *.local .env +./apps/login/.env.local.bak .cache server/dist public/dist diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88f243c4868..d0a6b12a89c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,10 @@ or have limited resources on your local machine. ### Developing Against Your Local ZITADEL Instance ```sh +# Backup your ./apps/login/.env.local if it exists to ./apps/login/.env.local.bak +mv ./apps/login/.env.local ./apps/login/.env.local.bak + +# Run ZITADEL and configure ./apps/login/.env.local docker compose --file ./acceptance/docker-compose.yaml run setup ``` diff --git a/apps/login/middleware.ts b/apps/login/middleware.ts new file mode 100644 index 00000000000..99e75cd9fa5 --- /dev/null +++ b/apps/login/middleware.ts @@ -0,0 +1,12 @@ +import { NextResponse } from 'next/server'; +import type { NextRequest } from 'next/server'; + +// This function can be marked `async` if using `await` inside +export function middleware(request: NextRequest) { + return NextResponse.redirect(new URL('/home', request.url)); +} + +// See "Matching Paths" below to learn more +export const config = { + matcher: '/about/:path*', +}; \ No newline at end of file