feat: add basic webui

This commit is contained in:
2024-12-30 06:39:09 +08:00
parent 608a7fb9c6
commit a4c549e7c3
462 changed files with 35900 additions and 2491 deletions

View File

@@ -0,0 +1,23 @@
import { env } from '@konobangu/env';
import {
type NoseconeOptions,
defaults,
withVercelToolbar,
} from '@nosecone/next';
export { createMiddleware as noseconeMiddleware } from '@nosecone/next';
// Nosecone security headers configuration
// https://docs.arcjet.com/nosecone/quick-start
const noseconeOptions: NoseconeOptions = {
...defaults,
// Content Security Policy (CSP) is disabled by default because the values
// depend on which Next Forge features are enabled. See
// https://docs.next-forge.com/features/security/headers for guidance on how
// to configure it.
contentSecurityPolicy: false,
};
export const noseconeConfig: NoseconeOptions =
env.NODE_ENV === 'development' && env.FLAGS_SECRET
? withVercelToolbar(noseconeOptions)
: noseconeOptions;