Forward Whois and DNS query data to LLM services

Forward Whois and DNS query data to LLM services (e.g. Server configuration assistant)
This commit is contained in:
Namhyeon Go 2025-04-12 14:24:59 +09:00
parent e7b6a87175
commit e5a89c9182

View File

@ -80,7 +80,7 @@
<span class="icon mif-earth"></span> <span class="icon mif-earth"></span>
<span class="caption">DNS</span> <span class="caption">DNS</span>
</button> </button>
<span class="title">Network</span> <span class="title">Network tools</span>
</div> </div>
</div> </div>
</div> </div>
@ -371,6 +371,7 @@
axios.get(`${serverPrefix}whois/${hostname}`).then(response => { axios.get(`${serverPrefix}whois/${hostname}`).then(response => {
const responseText = DOMPurify.sanitize(response.data, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] }); const responseText = DOMPurify.sanitize(response.data, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] });
appendTextToEditor(`/*\n${responseText}\n*/`); appendTextToEditor(`/*\n${responseText}\n*/`);
pushPromptMessage("system", responseText);
}).catch(error => { }).catch(error => {
console.error(error); console.error(error);
}); });
@ -386,6 +387,7 @@
axios.get(`${serverPrefix}dns-query/${hostname}`).then(response => { axios.get(`${serverPrefix}dns-query/${hostname}`).then(response => {
const responseText = response.data; const responseText = response.data;
appendTextToEditor(`/*\n${responseText}\n*/`); appendTextToEditor(`/*\n${responseText}\n*/`);
pushPromptMessage("system", responseText);
}).catch(error => { }).catch(error => {
console.error(error); console.error(error);
}); });