fix: remove query params from getCurrentDomain
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import type { HonoRequest } from "hono";
|
||||
|
||||
export function getCurrentDomain(req: HonoRequest) {
|
||||
return req.url.replace(req.path, "");
|
||||
let domain = req.url.replace(req.path, "");
|
||||
if (domain.includes("?")) {
|
||||
domain = domain.split("?")[0];
|
||||
}
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user