Remove www from domain.

This commit is contained in:
Mike Cao 2023-04-03 20:22:23 -07:00
parent 5103da331a
commit 8276a769e6

View File

@ -121,7 +121,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
const refUrl = new URL(referrer);
referrerPath = refUrl.pathname;
referrerQuery = refUrl.search.substring(1);
referrerDomain = refUrl.hostname;
referrerDomain = refUrl.hostname.replace(/www\./, '');
}
if (process.env.REMOVE_TRAILING_SLASH) {