️ feat: 在前端服务中添加端口映射,并在API客户端中记录后端URL

This commit is contained in:
2025-07-26 10:30:36 +08:00
parent b92fce5c7c
commit 7918f04059
3 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,6 @@ const nextConfig: NextConfig = {
],
},
async rewrites() {
console.log('Using development API base URL:', BACKEND_URL)
return [
{
source: '/api/:path*',

View File

@ -3,6 +3,8 @@ import { camelToSnakeObj, snakeToCamelObj } from 'field-conv'
export const BACKEND_URL = process.env.BACKEND_URL || 'http://neo-blog-backend:8888'
console.info(`Using backend URL: ${BACKEND_URL}`)
const isServer = typeof window === 'undefined'
const API_SUFFIX = '/api/v1'