✅ Changed axiosServer to use process.env.API_BASE_URL (not NEXT_PUBLIC_)
All checks were successful
Deploy Frontend / deploy (push) Successful in 20s
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:
@@ -1,8 +1,12 @@
|
|||||||
// src/lib/axiosServer.ts
|
// src/lib/axiosServer.ts
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import https from 'https';
|
||||||
|
|
||||||
const axiosServer = axios.create({
|
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;
|
export default axiosServer;
|
||||||
|
|||||||
Reference in New Issue
Block a user