next.config.js 1.1 KB

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