feat: import upstream ZITADEL Login V2 v4.20.4 source workspace
This commit is contained in:
1 parent
eadd0e558b
commit
4404849fc4
644 files changed
+153201
-10
No files matched your search
@@ -0,0 +1,82 @@
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
|
||||
const withNextIntl = createNextIntlPlugin();
|
||||
|
||||
const secureHeaders = [
|
||||
{
|
||||
key: "Strict-Transport-Security",
|
||||
value: "max-age=63072000; includeSubDomains; preload",
|
||||
},
|
||||
{
|
||||
key: "Referrer-Policy",
|
||||
value: "origin-when-cross-origin",
|
||||
},
|
||||
{
|
||||
key: "X-Content-Type-Options",
|
||||
value: "nosniff",
|
||||
},
|
||||
{
|
||||
key: "X-XSS-Protection",
|
||||
value: "1; mode=block",
|
||||
},
|
||||
{ key: "X-Frame-Options", value: "deny" },
|
||||
];
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
||||
output: process.env.NEXT_OUTPUT_MODE || undefined,
|
||||
reactStrictMode: true,
|
||||
typescript: {
|
||||
// Since Next.js 16.3 the build type-checks every file matched by tsconfig.json,
|
||||
// including unit tests, which vitest runs without type-checking.
|
||||
tsconfigPath: "tsconfig.build.json",
|
||||
},
|
||||
experimental: {
|
||||
// Add React 19 compatibility optimizations
|
||||
optimizePackageImports: ["@radix-ui/react-tooltip", "@heroicons/react"],
|
||||
serverActions: {
|
||||
...(process.env.SERVER_ACTION_ALLOWED_ORIGINS
|
||||
? { allowedOrigins: process.env.SERVER_ACTION_ALLOWED_ORIGINS.split(",").map((o) => o.trim()) }
|
||||
: {}),
|
||||
},
|
||||
},
|
||||
// Packages that must not be bundled by webpack and should remain as external
|
||||
// requires at runtime. These packages use native modules or have bundling
|
||||
// incompatibilities. Keep this list in sync with package.json dependencies
|
||||
// when adding new OpenTelemetry or logging packages.
|
||||
serverExternalPackages: [
|
||||
'winston',
|
||||
'@opentelemetry/api',
|
||||
'@opentelemetry/api-logs',
|
||||
'@opentelemetry/sdk-node',
|
||||
'@opentelemetry/sdk-metrics',
|
||||
'@opentelemetry/sdk-logs',
|
||||
'@opentelemetry/exporter-metrics-otlp-http',
|
||||
'@opentelemetry/exporter-logs-otlp-http',
|
||||
'@opentelemetry/exporter-prometheus',
|
||||
'@opentelemetry/resources',
|
||||
'@opentelemetry/semantic-conventions',
|
||||
'@opentelemetry/auto-instrumentations-node',
|
||||
'@opentelemetry/winston-transport',
|
||||
'@opentelemetry/resource-detector-container',
|
||||
'@opentelemetry/resource-detector-gcp',
|
||||
],
|
||||
// Improve SSR stability - not actually needed for React 19 SSR issues
|
||||
// onDemandEntries: {
|
||||
// maxInactiveAge: 25 * 1000,
|
||||
// pagesBufferLength: 2,
|
||||
// },
|
||||
// Better error handling for production builds
|
||||
poweredByHeader: false,
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: "/:path*",
|
||||
headers: secureHeaders,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default withNextIntl(nextConfig);
|
||||
Reference in new issue
Block a user