next.config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. const config = {
  2. reactStrictMode: true,
  3. pageExtensions: ["ts", "tsx", "mdx"],
  4. experimental: {
  5. useCache: true,
  6. },
  7. logging: {
  8. fetches: {
  9. fullUrl: true,
  10. },
  11. },
  12. turbopack: {
  13. rules: {
  14. "*.svg": {
  15. loaders: ["@svgr/webpack"],
  16. as: "*.js",
  17. },
  18. },
  19. },
  20. webpack(config) {
  21. config.module.rules.push({
  22. test: /\.svg$/i,
  23. use: ["@svgr/webpack"],
  24. });
  25. return config;
  26. },
  27. headers: async () => [
  28. {
  29. source: "/:path*",
  30. headers: [
  31. {
  32. key: "X-XSS-Protection",
  33. value: "1; mode=block",
  34. },
  35. {
  36. key: "Referrer-Policy",
  37. value: "strict-origin-when-cross-origin",
  38. },
  39. {
  40. key: "Strict-Transport-Security",
  41. value: "max-age=2592000",
  42. },
  43. {
  44. key: "X-Content-Type-Options",
  45. value: "nosniff",
  46. },
  47. {
  48. key: "Permissions-Policy",
  49. value:
  50. "vibrate=(), geolocation=(), midi=(), notifications=(), push=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), speaker=(), vibrate=(), fullscreen=self",
  51. },
  52. ],
  53. },
  54. ],
  55. };
  56. export default config;