Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : agentilab-web8 * File : next.config.ts9 * Module : Configuration10 * Repository : https://git.spboucher.ai/agentilab-web11 * Project Website : Not specified12 * Created : 2026-12-0513 * Last Modified : 2026-12-0514 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : Proprietary34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import type { NextConfig } from 'next';44import { staticSecurityHeaders } from './lib/security/headers';4546const nextConfig: NextConfig = {47 // scripts/release.sh construit dans un dossier à part, puis l’échange avec .next (bascule atomique).48 distDir: process.env.NEXT_DIST_DIR || '.next',49 poweredByHeader: false,50 reactStrictMode: true,51 trailingSlash: false,52 images: {53 formats: ['image/avif', 'image/webp'],54 deviceSizes: [390, 640, 828, 1080, 1280, 1920],55 imageSizes: [48, 64, 96, 128, 256, 384],56 minimumCacheTTL: 60 * 60 * 24 * 30,57 },58 async headers() {59 return [60 { source: '/:path*', headers: staticSecurityHeaders(process.env.NODE_ENV !== 'production') },61 {62 source: '/brands/:path*',63 headers: [{ key: 'Cache-Control', value: 'public, max-age=604800, stale-while-revalidate=86400' }],64 },65 ];66 },67};6869export default nextConfig;70