style: Fix formatting
This commit is contained in:
parent
82ec8f8f6f
commit
d1a43f56ba
2 changed files with 28 additions and 26 deletions
10
main.ts
10
main.ts
|
@ -26,7 +26,9 @@ const handler = (req: Request): Response => {
|
|||
const rootMatch = ROOT_PATTERN.exec(req.url);
|
||||
|
||||
if (rootMatch && req.method === "GET") {
|
||||
const clientIpAddress = req.headers.get("x-forwarded-for")?.split(",").shift() || req.headers.get("host");
|
||||
const clientIpAddress =
|
||||
req.headers.get("x-forwarded-for")?.split(",").shift() ||
|
||||
req.headers.get("host");
|
||||
const url = new URL(req.url);
|
||||
const format = url.searchParams.get("format");
|
||||
|
||||
|
@ -56,9 +58,9 @@ const handler = (req: Request): Response => {
|
|||
}
|
||||
};
|
||||
|
||||
console.log("IpMe - A self-hosted API for obtaining your public IP address.")
|
||||
console.log("IpMe - A self-hosted API for obtaining your public IP address.");
|
||||
console.log(`Version: ${getVersion()}`);
|
||||
console.log("Source Code: https://code.fosterhangdaan.com/foster/ipme")
|
||||
console.log("License: GNU AGPL (version 3 or later)")
|
||||
console.log("Source Code: https://code.fosterhangdaan.com/foster/ipme");
|
||||
console.log("License: GNU AGPL (version 3 or later)");
|
||||
|
||||
Deno.serve({ port }, handler);
|
||||
|
|
Loading…
Reference in a new issue