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(" ", "+");
const headers = {
'authority': 'rai.snxraven.me',
'authority': process.env.PUBLIC_URL,
'accept': 'text/event-stream',
};
console.log(session);

View File

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

View File

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