next.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type { NextConfig } from 'next'
  2. import createNextIntlPlugin from 'next-intl/plugin'
  3. const withNextIntl = createNextIntlPlugin()
  4. const nextConfig: NextConfig = {
  5. output: 'standalone',
  6. images: {
  7. remotePatterns: [],
  8. },
  9. allowedDevOrigins: ['10.0.0.217', '192.168.30.111'],
  10. experimental: {
  11. proxyClientMaxBodySize: '2gb',
  12. },
  13. async headers() {
  14. return [
  15. {
  16. source: '/share/status-report/:path*',
  17. headers: [
  18. { key: 'X-Robots-Tag', value: 'noindex, nofollow, noarchive, nosnippet' },
  19. { key: 'X-Frame-Options', value: 'DENY' },
  20. { key: 'Referrer-Policy', value: 'no-referrer' },
  21. { key: 'Cache-Control', value: 'no-store, no-cache, must-revalidate, private' },
  22. { key: 'X-Content-Type-Options', value: 'nosniff' },
  23. ],
  24. },
  25. ]
  26. },
  27. async rewrites() {
  28. return [
  29. // Old /api/files/ URLs stored in the DB before the protected/ restructure
  30. {
  31. source: '/api/files/:path*',
  32. destination: '/api/protected/files/:path*',
  33. },
  34. ]
  35. },
  36. }
  37. export default withNextIntl(nextConfig)