fixing auth issues
This commit is contained in:
parent
0ec7419cb7
commit
e38006bbc4
@ -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);
|
||||||
|
@ -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) => {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user