next.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import type { NextConfig } from "next";
  2. const nextConfig: NextConfig = {
  3. images: {
  4. remotePatterns: [
  5. {
  6. protocol: "https",
  7. hostname: "images.unsplash.com"
  8. }
  9. ]
  10. },
  11. async headers() {
  12. const noStoreHeaders = [
  13. {
  14. key: "Cache-Control",
  15. value: "no-store, no-cache, must-revalidate, proxy-revalidate"
  16. },
  17. {
  18. key: "Pragma",
  19. value: "no-cache"
  20. },
  21. {
  22. key: "Expires",
  23. value: "0"
  24. }
  25. ];
  26. return [
  27. {
  28. source: "/",
  29. headers: noStoreHeaders
  30. },
  31. {
  32. source: "/chat",
  33. headers: noStoreHeaders
  34. },
  35. {
  36. source: "/library",
  37. headers: noStoreHeaders
  38. },
  39. {
  40. source: "/agents",
  41. headers: noStoreHeaders
  42. },
  43. {
  44. source: "/agents/:path*",
  45. headers: noStoreHeaders
  46. },
  47. {
  48. source: "/reader/:path*",
  49. headers: noStoreHeaders
  50. },
  51. {
  52. source: "/api/:path*",
  53. headers: noStoreHeaders
  54. }
  55. ];
  56. }
  57. };
  58. export default nextConfig;