feat(config, layout, components): enhance security headers, improve SEO, and update project descriptions
- Added security headers in the Next.js configuration to enhance application security. - Updated metadata in the layout component for improved SEO, including new titles, descriptions, and keywords. - Introduced JSON-LD schema for projects to enhance search engine visibility. - Enhanced project descriptions in the portfolio data for clarity and detail. - Improved header component with logo integration and refined social media links for better accessibility.
This commit is contained in:
1 parent
3f3fca11ab
commit
ad6a76efdd
14 files changed
+467
-57
No files matched your search
+45
-15
@@ -18,23 +18,37 @@ const nextConfig: NextConfig = {
|
||||
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=()",
|
||||
},
|
||||
];
|
||||
|
||||
// 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: [
|
||||
{
|
||||
key: "X-Frame-Options",
|
||||
value: "DENY",
|
||||
},
|
||||
{
|
||||
key: "X-Content-Type-Options",
|
||||
value: "nosniff",
|
||||
},
|
||||
{
|
||||
key: "Referrer-Policy",
|
||||
value: "origin-when-cross-origin",
|
||||
},
|
||||
],
|
||||
headers: securityHeaders,
|
||||
},
|
||||
{
|
||||
source: "/static/(.*)",
|
||||
@@ -57,13 +71,29 @@ const nextConfig: NextConfig = {
|
||||
];
|
||||
},
|
||||
|
||||
// Proxy reverso para bypass de adblockers (Rybbit Analytics)
|
||||
// Proxy reverso para bypass de adblockers
|
||||
async rewrites() {
|
||||
return [
|
||||
// Rybbit Analytics
|
||||
{
|
||||
source: "/analytics/:match*",
|
||||
destination: "https://analytics.evandro.dev.br/:match*",
|
||||
},
|
||||
// Google Tag Manager - Script principal
|
||||
{
|
||||
source: "/gtm/js/:id",
|
||||
destination: "https://www.googletagmanager.com/gtag/js?id=:id",
|
||||
},
|
||||
// Google Analytics - Endpoints de coleta
|
||||
{
|
||||
source: "/ga/:match*",
|
||||
destination: "https://www.google-analytics.com/:match*",
|
||||
},
|
||||
// Google Analytics - Endpoint alternativo (g/collect)
|
||||
{
|
||||
source: "/g/:match*",
|
||||
destination: "https://www.google-analytics.com/g/:match*",
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user