fixing auth issues

This commit is contained in:
Raven Scott 2023-03-25 19:40:50 +02:00
parent 0ec7419cb7
commit e38006bbc4
3 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ module.exports = {
let prompt = interaction.options._hoistedOptions[0].value.replace(" ", "+"); let prompt = interaction.options._hoistedOptions[0].value.replace(" ", "+");
const headers = { const headers = {
'authority': 'rai.snxraven.me', 'authority': process.env.PUBLIC_URL,
'accept': 'text/event-stream', 'accept': 'text/event-stream',
}; };
console.log(session); console.log(session);

View File

@ -14,8 +14,8 @@ module.exports = {
.post(`https://${process.env.PUBLIC_URL}/api/chat`) .post(`https://${process.env.PUBLIC_URL}/api/chat`)
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json' }) .headers({ 'Accept': 'application/json', 'Content-Type': 'application/json' })
.auth({ .auth({
user: 'rai', user: process.env.USER,
pass: 'ilikeai', pass: process.env.PASS,
sendImmediately: true sendImmediately: true
}) })
.then((response) => { .then((response) => {

View File

@ -28,14 +28,14 @@ module.exports = {
return; return;
} }
const headers = { const headers = {
'authority': 'rai.snxraven.me', 'authority': process.env.PUBLIC_URL,
'accept': 'text/event-stream', 'accept': 'text/event-stream',
}; };
const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/` + session2, { const response = await axios.get(`http://${process.env.INTERNAL_IP}:8008/api/chat/` + session2, {
headers, headers,
auth: { auth: {
username: "rai", username: process.env.USER,
password: "ilikeai" password: process.env.PASS
} }
}); });