next.config.js 1.2 KB

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