From cc044aca17a6a630746a916d4921bb2cedbf29a8 Mon Sep 17 00:00:00 2001 From: Bailey Taylor Date: Fri, 10 Oct 2025 08:24:58 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Changed=20axiosServer=20to=20use=20?= =?UTF-8?q?process.env.API=5FBASE=5FURL=20(not=20NEXT=5FPUBLIC=5F)=20?= =?UTF-8?q?=E2=9C=85=20Reverted=20.env.local=20to=20use=20https://sys.psg.?= =?UTF-8?q?net.au:8443/api=20=E2=9C=85=20Added=20httpsAgent=20with=20rejec?= =?UTF-8?q?tUnauthorized:=20false=20to=20accept=20the=20SSL=20certificate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/axiosServer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/axiosServer.ts b/src/lib/axiosServer.ts index 948939d..bc9ac80 100644 --- a/src/lib/axiosServer.ts +++ b/src/lib/axiosServer.ts @@ -1,8 +1,12 @@ // src/lib/axiosServer.ts import axios from 'axios'; +import https from 'https'; const axiosServer = axios.create({ - baseURL: process.env.NEXT_PUBLIC_API_BASE_URL || 'http://localhost:8080/api', + baseURL: process.env.API_BASE_URL || 'http://localhost:8080/api', + httpsAgent: new https.Agent({ + rejectUnauthorized: false, // Accept self-signed certificates + }), }); export default axiosServer;