feat(api): update API configuration and add proxy rewrites
- Remove the NEXT_PUBLIC_API_URL from the production environment file. - Change axios base URL to use a local proxy endpoint. - Add rewrites in next.config.mjs to route API requests through the proxy.
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
import axios from "axios";
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: process.env.NEXT_PUBLIC_API_URL,
|
||||
baseURL: "/api/proxy/",
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user