next.config.js 1.2 KB

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