next.config.mjs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // import type { NextConfig } from "next";
  2. /** @type {import('next').NextConfig} */
  3. const nextConfig = {
  4. /* config options here */
  5. images: {
  6. remotePatterns: [
  7. {
  8. protocol: "https",
  9. hostname: "hi-po.oss-cn-beijing.aliyuncs.com",
  10. },
  11. ],
  12. },
  13. async rewrites() {
  14. return [
  15. {
  16. source: "/api/v1/cms/listArticle",
  17. // destination: "http://localhost:8089/api/v1/cms/listArticle",
  18. destination: "https://hi-po.com.cn/api/v1/cms/listArticle",
  19. },
  20. {
  21. source: "/api/v1/cms/articleDetail",
  22. // destination: "http://localhost:8089/api/v1/cms/articleDetail",
  23. destination: "https://hi-po.com.cn/api/v1/cms/articleDetail",
  24. },
  25. {
  26. source: "/api/v1/order/buyArticle",
  27. // destination: "http://localhost:8089/api/v1/order/buyArticle",
  28. destination: "https://hi-po.com.cn/api/v1/order/buyArticle",
  29. },
  30. {
  31. source: "/api/v1/user/:path*",
  32. // destination: "http://localhost:8089/api/v1/user/:path*",
  33. destination: "https://hi-po.com.cn/api/v1/user/:path*",
  34. },
  35. ];
  36. },
  37. };
  38. export default nextConfig;