// import type { NextConfig } from "next";
/** @type {import('next').NextConfig} */
const nextConfig = {
  /* config options here */
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "hi-po.oss-cn-beijing.aliyuncs.com",
      },
    ],
  },

  async rewrites() {
    return [
      {
        source: "/api/v1/cms/listArticle",
        // destination: "http://localhost:8089/api/v1/cms/listArticle",
        destination: "https://hi-po.com.cn/api/v1/cms/listArticle",
      },
      {
        source: "/api/v1/cms/articleDetail",
        // destination: "http://localhost:8089/api/v1/cms/articleDetail",
        destination: "https://hi-po.com.cn/api/v1/cms/articleDetail",
      },
      {
        source: "/api/v1/order/buyArticle",
        // destination: "http://localhost:8089/api/v1/order/buyArticle",
        destination: "https://hi-po.com.cn/api/v1/order/buyArticle",
      },
      {
        source: "/api/v1/user/:path*",
        // destination: "http://localhost:8089/api/v1/user/:path*",
        destination: "https://hi-po.com.cn/api/v1/user/:path*",
      },
    ];
  },
};

export default nextConfig;
