403Webshell
Server IP : 217.154.3.148  /  Your IP : 216.73.216.90
Web Server : Apache
System : Linux blissful-wright.217-154-3-148.plesk.page 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : gracious-boyd_hfhh1h8vo9n ( 10000)
PHP Version : 8.3.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs//next.config.mjs
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

/** @type {import('next').NextConfig} */
const nextConfig = {
  basePath: '/nextjs',
  images: { unoptimized: true },
  experimental: {
    serverActions: { bodySizeLimit: '10mb' },
  },
  serverExternalPackages: ['onnxruntime-node'],
  // Keep builds resilient in production; tighten in CI if desired
  eslint: { ignoreDuringBuilds: true },
  typescript: { ignoreBuildErrors: true },
  async rewrites() {
    // Serve ONNX Runtime Web WASM files from CDN to avoid 404s
    return [
      {
        source: '/_ort/:path*',
        destination: 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.17.1/dist/:path*',
      },
    ];
  },
  async headers() {
    return [
      // Ensure static assets stay cacheable
      {
        source: '/_next/static/:path*',
        headers: [
          { key: 'Cache-Control', value: 'public, max-age=31536000, immutable' },
        ],
      },
      // Force no-store for the visualizer HTML
      {
        source: '/visualizer',
        headers: [
          { key: 'Cache-Control', value: 'no-store' },
        ],
      },
      // Disable caching for HTML documents to avoid stale asset references
      {
        source: '/:path*',
        has: [
          { type: 'header', key: 'accept', value: '.*text/html.*' },
        ],
        headers: [
          { key: 'Cache-Control', value: 'no-store' },
        ],
      },
    ];
  },
  webpack: (config) => {
    // Ensure TS path alias `@/*` also works in Webpack
    config.resolve = config.resolve || {};
    config.resolve.alias = {
      ...(config.resolve.alias || {}),
      '@': path.resolve(__dirname),
    };
    config.externals = [
      ...(config.externals || []),
      { 'onnxruntime-node': 'commonjs onnxruntime-node' },
    ];
    return config;
  },
};
export default nextConfig;

Youez - 2016 - github.com/yon3zu
LinuXploit