next.config.js 1.0 KB

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