diff --git a/index.js b/index.js index 5c2e323..085e017 100644 --- a/index.js +++ b/index.js @@ -165,15 +165,17 @@ var src_default = { } }); - //Print HTML if request is to ip.ajam.dev/html - } else if (pathname === "/html") { - const htmlStr = jsonToHtml(filteredJson); + //Print html if request is to ip.ajam.dev/html + } else if (pathname === "/html") { + let htmlStr = jsonToHtml(filteredJson); console.log(htmlStr); + const endpointsRow = `endpoints/csv /ip /json /text /xml /yaml`; + htmlStr = htmlStr.replace('\n\n', `${endpointsRow}\n\n`); return new Response(htmlStr, { - headers: { - ...CORS_HEADERS, - "Content-Type": "text/html;charset=utf-8", - } + headers: { + ...CORS_HEADERS, + "Content-Type": "text/html;charset=utf-8", + } }); //Print json if request is to ip.ajam.dev/json