This commit is contained in:
parent
dd02eda555
commit
710ff8c855
|
|
@ -10,10 +10,7 @@ import type {
|
|||
Ticker,
|
||||
} from "./types";
|
||||
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000";
|
||||
|
||||
const apiClient = axios.create({
|
||||
baseURL: API_URL,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@ import type { NextConfig } from "next";
|
|||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
reactCompiler: true,
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: "/api/:path*",
|
||||
destination: `${
|
||||
process.env.API_URL || "http://backend:8000"
|
||||
}/api/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
|
|
|||
Loading…
Reference in New Issue