fix: check port 8080 and fallback to 80

This commit is contained in:
peaklabs-dev
2024-12-17 11:02:47 +01:00
parent cd14501612
commit 02976e454a

View File

@@ -33,12 +33,22 @@ const verifyClient = async (info, callback) => {
try {
// Authenticate with Laravel backend
const response = await axios.post(`http://coolify/terminal/auth`, null, {
let response;
try {
response = await axios.post(`http://coolify:8080/terminal/auth`, null, {
headers: {
'Cookie': `${sessionCookieName}=${laravelSession}`,
'X-XSRF-TOKEN': xsrfToken
},
});
} catch (error) {
response = await axios.post(`http://coolify/terminal/auth`, null, {
headers: {
'Cookie': `${sessionCookieName}=${laravelSession}`,
'X-XSRF-TOKEN': xsrfToken
},
});
}
if (response.status === 200) {
// Authentication successful