feat: add basic webui
This commit is contained in:
23
packages/security/middleware.ts
Normal file
23
packages/security/middleware.ts
Normal 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;
|
||||
Reference in New Issue
Block a user