next.config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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/parsePriceFeedUpdates",
  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. transpilePackages: ["@pythnetwork/*"],
  27. headers: () => [
  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. };