Skip to content

Commit e179cf3

Browse files
committed
Fix domain normalization for uppercase WWW prefix
1 parent 96476ab commit e179cf3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

skills/domain-firewall/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Copy this into your project. The file exports all types, built-in policies, and
180180

181181
```typescript
182182
function normalizeDomain(hostname: string): string {
183-
return hostname.replace(/^www\./, "").toLowerCase();
183+
return hostname.toLowerCase().replace(/^www\./, "");
184184
}
185185
186186
function ts(): string {

skills/domain-firewall/scripts/domain-firewall.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Environment:
9595
// =============================================================================
9696

9797
function normalizeDomain(hostname) {
98-
return hostname.replace(/^www\./, "").toLowerCase();
98+
return hostname.toLowerCase().replace(/^www\./, "");
9999
}
100100

101101
function ts() {

0 commit comments

Comments
 (0)