Changed axiosServer to use process.env.API_BASE_URL (not NEXT_PUBLIC_)
All checks were successful
Deploy Frontend / deploy (push) Successful in 20s

 Reverted .env.local to use https://sys.psg.net.au:8443/api
 Added httpsAgent with rejectUnauthorized: false to accept the SSL certificate
This commit is contained in:
Bailey Taylor
2025-10-10 08:24:58 +08:00
parent 12c9e75743
commit cc044aca17

View File

@@ -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;