Skip to content

Commit f6ae0ac

Browse files
committed
feat: normalize domains for license validation to handle www vs non-www
- normalize both current and assigned URLs for local validation - send original assigned URL to server for backward compatibility - ensures licenses registered with www. work on non-www domains and vice versa
1 parent 7fde851 commit f6ae0ac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

classes/Support/License.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ public function isValid(): bool
155155
return false;
156156
}
157157

158-
if ($this->assignedUrl !== static::normalizeUrl(App::instance()->system()->indexUrl())) {
158+
$currentUrl = static::normalizeUrl(App::instance()->system()->indexUrl());
159+
$assignedUrl = static::normalizeUrl($this->assignedUrl);
160+
161+
if ($assignedUrl !== $currentUrl) {
159162
return false;
160163
}
161164

@@ -175,7 +178,7 @@ public function isValid(): bool
175178
'Accept' => 'application/json',
176179
],
177180
'data' => Json::encode([
178-
'url' => App::instance()->system()->indexUrl(),
181+
'url' => $this->assignedUrl,
179182
])
180183
]);
181184

0 commit comments

Comments
 (0)