| Server IP : 14.225.204.176 / Your IP : 216.73.216.191 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/php/zinisoft.net-react/ |
Upload File : |
/** @type {import('next').NextConfig} */
// Inline <script>/<style> are unavoidable here: JSON-LD schema blocks, Next's
// own bootstrap script, and the pervasive `style={{...}}` props in the theme.
// Everything else is locked to self + the known CMS/embed hosts.
const contentSecurityPolicy = [
"default-src 'self'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval'",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob: https://zinisoft.net https://admin.zinisoft.net https://secure.gravatar.com",
"font-src 'self' data:",
"connect-src 'self' https://admin.zinisoft.net",
"frame-src 'self' https://www.youtube.com https://www.youtube-nocookie.com https://player.vimeo.com",
"object-src 'none'",
"base-uri 'self'",
"form-action 'self'",
"frame-ancestors 'self'",
"upgrade-insecure-requests",
].join("; ");
const securityHeaders = [
{ key: "Content-Security-Policy", value: contentSecurityPolicy },
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{ key: "X-DNS-Prefetch-Control", value: "on" },
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=(), browsing-topics=()",
},
];
const nextConfig = {
reactStrictMode: true,
poweredByHeader: false,
images: {
// Narrow breakpoint set: every extra size is another variant the optimizer
// can be asked to generate, which is the DoS surface in the advisories for
// the Image Optimization API.
deviceSizes: [640, 828, 1080, 1200, 1920],
imageSizes: [96, 180, 256, 384],
formats: ["image/avif", "image/webp"],
minimumCacheTTL: 2678400, // 31 days — bounds on-disk cache churn
remotePatterns: [
{
protocol: "https",
hostname: "zinisoft.net",
},
{
protocol: "https",
hostname: "admin.zinisoft.net",
},
{
protocol: "https",
hostname: "secure.gravatar.com",
},
],
},
async headers() {
return [
{
source: "/:path*",
headers: securityHeaders,
},
];
},
};
module.exports = nextConfig;