fix: environment variable API_URL can't be changed
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import httpProxyMiddleware from "next-http-proxy-middleware";
|
||||
import getConfig from "next/config";
|
||||
|
||||
export const config = {
|
||||
api: {
|
||||
@@ -9,7 +8,7 @@ export const config = {
|
||||
},
|
||||
};
|
||||
|
||||
const { apiURL } = getConfig().serverRuntimeConfig;
|
||||
const apiURL = process.env.API_URL || "http://localhost:8080";
|
||||
|
||||
// A proxy to the API server only used in development.
|
||||
// In production this route gets overridden by Caddy.
|
||||
|
||||
Reference in New Issue
Block a user