spine-framework 0.3.102 → 0.3.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -148,7 +148,9 @@ export function AppsRegistryProvider({ children }: AppsRegistryProviderProps) {
|
|
|
148
148
|
const appMatchesDomain = (app: AppRecord): boolean => {
|
|
149
149
|
const domain = environment === 'preview' ? app.preview_domain : app.prod_domain
|
|
150
150
|
if (!domain) return true
|
|
151
|
-
|
|
151
|
+
// Accept both "hostname.com" and "https://hostname.com" formats
|
|
152
|
+
const hostname = domain.includes('://') ? new URL(domain).hostname : domain.split(':')[0]
|
|
153
|
+
return currentHost === hostname
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
const routableApps = apps.filter(
|
|
@@ -73,7 +73,9 @@ export function useApps(): UseAppsResult {
|
|
|
73
73
|
const appMatchesDomain = (app: AppRecord): boolean => {
|
|
74
74
|
const domain = environment === 'preview' ? app.preview_domain : app.prod_domain
|
|
75
75
|
if (!domain) return true
|
|
76
|
-
|
|
76
|
+
// Accept both "hostname.com" and "https://hostname.com" formats
|
|
77
|
+
const hostname = domain.includes('://') ? new URL(domain).hostname : domain.split(':')[0]
|
|
78
|
+
return currentHost === hostname
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
// Filter by user's roles: include app if user has any of the required_roles,
|