feat: Introduce runtime configuration for domain and enhance S3 storage settings with public base URL and Contabo support.

This commit is contained in:
Christomatt
2026-02-03 01:27:46 +01:00
parent 91d122ca3a
commit 38ddbf8bc1
20 changed files with 244 additions and 48 deletions
+2
View File
@@ -15,6 +15,7 @@ const registerSchema = z.object({
// S3-compatible storage credentials
storageProvider: z.string().min(1),
storageEndpoint: z.string().nullable().optional(),
storagePublicBaseUrl: z.string().nullable().optional(),
storageRegion: z.string().min(1),
storageBucket: z.string().min(1),
storageAccessKey: z.string().min(10),
@@ -71,6 +72,7 @@ export async function POST(request: Request) {
data.displayName,
data.storageProvider,
data.storageEndpoint || null,
data.storagePublicBaseUrl || null,
data.storageRegion,
data.storageBucket,
data.storageAccessKey,
+1
View File
@@ -78,6 +78,7 @@ export async function POST(request: Request) {
botAvatarUrl = await generateAndUploadAvatarToUserStorage(
botHandle,
user.storageEndpoint || undefined,
user.storagePublicBaseUrl || undefined,
user.storageRegion || 'auto',
user.storageBucket,
accessKeyId,
+7
View File
@@ -0,0 +1,7 @@
import { NextResponse } from 'next/server';
export async function GET() {
return NextResponse.json({
domain: process.env.NEXT_PUBLIC_NODE_DOMAIN || process.env.NODE_DOMAIN || 'localhost:3000',
});
}
+1
View File
@@ -64,6 +64,7 @@ export async function POST(req: NextRequest) {
file.type,
user.storageProvider as any,
user.storageEndpoint,
user.storagePublicBaseUrl,
user.storageRegion || 'us-east-1',
user.storageBucket || '',
user.storageAccessKeyEncrypted,