mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 06:08:38 +01:00
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch, LOKI_* env keys, loki-* units. This repo referenced the old name in 15 files changed, 29 insertions(+), 29 deletions(-). Email addresses at the old sending domain stay until the new domain is verified in Resend. Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
112 lines
3.5 KiB
JavaScript
112 lines
3.5 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: 'standalone',
|
|
images: {
|
|
// The remotePatterns entry that lived here allowed post images to be
|
|
// loaded from the retired botsmann-blog-content GitHub repo. Post images
|
|
// are committed under public/blog/ now, so nothing remote is left to allow.
|
|
unoptimized: true,
|
|
},
|
|
serverExternalPackages: ['onnxruntime-node', '@xenova/transformers', 'sharp'],
|
|
// typedRoutes graduated from `experimental` to a stable top-level option in Next 16.
|
|
typedRoutes: true,
|
|
env: {
|
|
NEXT_PUBLIC_DEPLOY_TIME: new Date().toUTCString(),
|
|
},
|
|
// Redirects for URL structure migration
|
|
async redirects() {
|
|
return [
|
|
// Documents -> My Data
|
|
{
|
|
source: '/documents',
|
|
destination: '/my-data',
|
|
permanent: true,
|
|
},
|
|
// Create -> Personal
|
|
{
|
|
source: '/create',
|
|
destination: '/personal',
|
|
permanent: true,
|
|
},
|
|
// Solutions -> Enterprise (consolidation)
|
|
{
|
|
source: '/solutions/businesses',
|
|
destination: '/enterprise',
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: '/solutions/governments',
|
|
destination: '/enterprise',
|
|
permanent: true,
|
|
},
|
|
];
|
|
},
|
|
headers: async () => {
|
|
const securityHeaders = [
|
|
{
|
|
key: 'Strict-Transport-Security',
|
|
value: 'max-age=31536000; includeSubDomains',
|
|
},
|
|
{
|
|
key: 'X-Content-Type-Options',
|
|
value: 'nosniff',
|
|
},
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'DENY',
|
|
},
|
|
{
|
|
key: 'Referrer-Policy',
|
|
value: 'strict-origin-when-cross-origin',
|
|
},
|
|
{
|
|
key: 'Permissions-Policy',
|
|
value: 'camera=(), microphone=(), geolocation=()',
|
|
},
|
|
{
|
|
key: 'Content-Security-Policy',
|
|
value: [
|
|
"default-src 'self'",
|
|
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://giscus.app https://platform.twitter.com https://loki.orangecat.ch",
|
|
"style-src 'self' 'unsafe-inline'",
|
|
"img-src 'self' data: blob: https://images.unsplash.com",
|
|
"font-src 'self'",
|
|
// api.github.com / raw.githubusercontent.com were here so the blog and
|
|
// Knowledge Center could fetch their markdown from two separate
|
|
// GitHub repos at request time. That content is committed under
|
|
// content/ now and read from disk at build time — nothing in the app
|
|
// talks to GitHub any more.
|
|
"connect-src 'self' https://api.groq.com https://openrouter.ai https://api.openai.com https://*.supabase.co https://supabase.orangecat.ch https://loki.orangecat.ch",
|
|
// bip-kit renders video embeds through the privacy players only
|
|
// (youtube-nocookie / player.vimeo.com) and allowlists the source
|
|
// hosts at parse time — a markdown file cannot inject another iframe.
|
|
"frame-src 'self' https://www.youtube-nocookie.com https://player.vimeo.com https://giscus.app",
|
|
"frame-ancestors 'none'",
|
|
].join('; '),
|
|
},
|
|
];
|
|
|
|
return [
|
|
{
|
|
source: '/api/:path*',
|
|
headers: [{ key: 'Cache-Control', value: 'no-store, max-age=0' }],
|
|
},
|
|
{
|
|
source: '/(.*)',
|
|
headers: securityHeaders,
|
|
},
|
|
{
|
|
source: '/((?!api).*)',
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'public, max-age=3600, s-maxage=86400, stale-while-revalidate=60',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|