fix: Handles node-info IPv6 address URIs

This commit is contained in:
Ariesly 2023-12-29 07:10:47 +00:00
parent c2bd80207a
commit e8dab545f5

View File

@ -22,7 +22,10 @@ async function getNodeInfo(req, res) {
const info = await $http
.get({
url: `http://ip-api.com/json/${encodeURIComponent(
proxy.server,
proxy.server
.trim()
.replace(/^\[/, '')
.replace(/\]$/, '')
)}?lang=${lang}`,
headers: {
'User-Agent':