mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
- tokens: remover aceite de expiresAt NULL e forçar TTL de 1 ano - tokens: corrigir refresh que invalidava access token anterior - xlsx: desabilitar parsing de fórmulas (CVE-2024-44294) - csp: expandir Content-Security-Policy com origens explícitas - headers: adicionar Referrer-Policy e X-Permitted-Cross-Domain-Policies - api: retornar 401 JSON em vez de redirect 302 em rotas autenticadas - health: remover version disclosure do /api/health - robots.txt: simplificar para não expor rotas internas - sitemap: corrigir URL com protocolo duplicado - criar security.txt (RFC 9116) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
76 lines
1.6 KiB
TypeScript
76 lines
1.6 KiB
TypeScript
import dotenv from "dotenv";
|
|
import type { NextConfig } from "next";
|
|
|
|
// Carregar variáveis de ambiente explicitamente
|
|
dotenv.config();
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
cacheComponents: true,
|
|
reactCompiler: true,
|
|
|
|
images: {
|
|
remotePatterns: [new URL("https://lh3.googleusercontent.com/**")],
|
|
},
|
|
devIndicators: {
|
|
position: "bottom-right",
|
|
},
|
|
experimental: {
|
|
prefetchInlining: true,
|
|
turbopackFileSystemCacheForDev: true,
|
|
},
|
|
|
|
// Headers for Safari compatibility
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/:path*",
|
|
headers: [
|
|
{
|
|
key: "X-DNS-Prefetch-Control",
|
|
value: "on",
|
|
},
|
|
{
|
|
key: "Strict-Transport-Security",
|
|
value: "max-age=31536000; includeSubDomains",
|
|
},
|
|
{
|
|
key: "X-Content-Type-Options",
|
|
value: "nosniff",
|
|
},
|
|
{
|
|
key: "X-Frame-Options",
|
|
value: "DENY",
|
|
},
|
|
{
|
|
key: "Content-Security-Policy",
|
|
value: [
|
|
"default-src 'self'",
|
|
"script-src 'self' 'unsafe-inline' https://umami.felipecoutinho.com",
|
|
"style-src 'self' 'unsafe-inline'",
|
|
"img-src 'self' https://lh3.googleusercontent.com data: blob:",
|
|
"font-src 'self'",
|
|
"connect-src 'self' https://umami.felipecoutinho.com",
|
|
"frame-ancestors 'none'",
|
|
].join("; "),
|
|
},
|
|
{
|
|
key: "Referrer-Policy",
|
|
value: "strict-origin-when-cross-origin",
|
|
},
|
|
{
|
|
key: "X-Permitted-Cross-Domain-Policies",
|
|
value: "none",
|
|
},
|
|
{
|
|
key: "Permissions-Policy",
|
|
value: "camera=(), microphone=(), geolocation=()",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|