Remove obsolete scripts and configuration files for self-hosting and database migrations

- Deleted `pnpm-workspace.yaml` as it is no longer needed.
- Removed `apply-migrations.sh` script that handled database migrations.
- Eliminated `generate-full-stack-env.mjs` script for environment variable generation.
- Deleted `selfhost-backup.sh` script for creating backups of the self-hosted environment.
- Removed `selfhost-doctor.sh` script for health checks of the self-hosted services.
- Deleted `selfhost-restore.sh` script for restoring backups in the self-hosted environment.
This commit is contained in:
Poyraz
2026-06-16 09:57:32 +03:00
parent da8c55d1ad
commit 72a0b38f3e
48 changed files with 2463 additions and 13020 deletions
+15 -6
View File
@@ -2,14 +2,23 @@ import { createServerClient } from '@supabase/ssr'
import { NextResponse, type NextRequest } from 'next/server'
export async function updateSession(request: NextRequest) {
const pathname = request.nextUrl.pathname
if (
pathname.startsWith('/login') ||
pathname.startsWith('/register') ||
pathname.startsWith('/auth') ||
pathname.startsWith('/forgot-password')
) {
return NextResponse.next({ request })
}
let supabaseResponse = NextResponse.next({
request,
})
const supabaseUrl =
process.env.SUPABASE_INTERNAL_URL || process.env.NEXT_PUBLIC_SUPABASE_URL!
const supabase = createServerClient(
supabaseUrl,
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
cookies: {
@@ -39,9 +48,9 @@ export async function updateSession(request: NextRequest) {
if (
!user &&
!request.nextUrl.pathname.startsWith('/login') &&
!request.nextUrl.pathname.startsWith('/register') &&
!request.nextUrl.pathname.startsWith('/auth')
!pathname.startsWith('/login') &&
!pathname.startsWith('/register') &&
!pathname.startsWith('/auth')
) {
// no user, potentially respond by redirecting the user to the login page
const url = request.nextUrl.clone()