Hero: replace particle field with cobe globe (Capricorn view, multi-axis drag, reduced-motion safe), telemetry HUD with pointer parallax, particle text build effect, Space Grotesk display font. SEO: short titles with template, PT-BR accents, twitter cards on dynamic cases, escaped JSON-LD via lib/jsonld.ts, CSP report-only, 25 service FAQs answer-first. Design: fix TW4 layered reset killing spacing utilities, literal @theme tokens, mobile hero overflow, header overlap, empty case cards. Remove framer-motion (unified on motion/react), header version badge, phone number from hero CTA. Production build verified (24 static pages).
123 lines
3.2 KiB
TypeScript
123 lines
3.2 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Otimização de imagens
|
|
images: {
|
|
formats: ["image/webp", "image/avif"],
|
|
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
|
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
|
|
minimumCacheTTL: 60,
|
|
},
|
|
|
|
turbopack: {
|
|
root: process.cwd(),
|
|
},
|
|
|
|
// Headers de cache e segurança
|
|
async headers(): Promise<
|
|
Array<{ source: string; headers: Array<{ key: string; value: string }> }>
|
|
> {
|
|
const securityHeaders = [
|
|
{
|
|
key: "X-Frame-Options",
|
|
value: "DENY",
|
|
},
|
|
{
|
|
key: "X-Content-Type-Options",
|
|
value: "nosniff",
|
|
},
|
|
{
|
|
key: "Referrer-Policy",
|
|
value: "strict-origin-when-cross-origin",
|
|
},
|
|
{
|
|
key: "Permissions-Policy",
|
|
value: "camera=(), microphone=(), geolocation=()",
|
|
},
|
|
{
|
|
key: "Content-Security-Policy-Report-Only",
|
|
value:
|
|
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com; connect-src 'self' https://www.google-analytics.com https://analytics.google.com; img-src 'self' data: blob: https:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; frame-ancestors 'none'; object-src 'none'; base-uri 'self'",
|
|
},
|
|
];
|
|
|
|
// HSTS apenas em produção com HTTPS
|
|
if (process.env.NODE_ENV === "production") {
|
|
securityHeaders.push({
|
|
key: "Strict-Transport-Security",
|
|
value: "max-age=31536000; includeSubDomains; preload",
|
|
});
|
|
}
|
|
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: securityHeaders,
|
|
},
|
|
{
|
|
source: "/static/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Cache-Control",
|
|
value: "public, max-age=31536000, immutable",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: "/fonts/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Cache-Control",
|
|
value: "public, max-age=31536000, immutable",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: "/assets/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Cache-Control",
|
|
value: "public, max-age=31536000, immutable",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: "/logos/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Cache-Control",
|
|
value: "public, max-age=31536000, immutable",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
|
|
// Proxy reverso para bypass de adblockers
|
|
async rewrites() {
|
|
return [
|
|
// Rybbit Analytics
|
|
{
|
|
source: "/analytics/:match*",
|
|
destination: "https://analytics.evandro.dev.br/:match*",
|
|
},
|
|
// Google Analytics - Script principal (camuflado como lib de sistema)
|
|
{
|
|
source: "/sys/libs/vendor-utils.js",
|
|
destination: "https://www.googletagmanager.com/gtag/js?id=G-QTT9QT0T3S",
|
|
},
|
|
// Google Analytics - Endpoint de coleta (camuflado como API de vitals)
|
|
// O gtag.js adiciona "/g/collect" automaticamente ao final da transport_url
|
|
{
|
|
source: "/sys/api/vitals/g/collect",
|
|
destination: "https://www.google-analytics.com/g/collect",
|
|
},
|
|
];
|
|
},
|
|
|
|
// Compressão
|
|
compress: true,
|
|
};
|
|
|
|
export default nextConfig;
|