We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36d3990 commit 2c638d9Copy full SHA for 2c638d9
packages/script/src/extensions/outbound-domains.js
@@ -18,9 +18,10 @@ const initOutboundDomains = () => {
18
const normalizedUrlHostname = normalizeDomain(urlHostname);
19
const normalizedDomain = normalizeDomain(domain);
20
21
- // if wildcard domain, check if the url hostname ends with the domain
+ // if wildcard domain, check if the url hostname ends with the apex domain
22
if (normalizedDomain.startsWith('*.')) {
23
- return normalizedUrlHostname.endsWith(normalizedDomain.slice(2));
+ const apexDomain = normalizedDomain.slice(2);
24
+ return normalizedUrlHostname.endsWith(`.${apexDomain}`);
25
}
26
27
// check for exact match after removing www.
0 commit comments