@uniweb/runtime 0.29.5 → 0.29.6
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/runtime",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.6",
|
|
4
4
|
"description": "Minimal runtime for loading Uniweb foundations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"node": ">=20.19"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@uniweb/core": "^0.38.
|
|
39
|
+
"@uniweb/core": "^0.38.1",
|
|
40
40
|
"@uniweb/theming": "^0.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
@@ -13,6 +13,7 @@ import Layout from './Layout.jsx'
|
|
|
13
13
|
import { useHeadMeta } from '../hooks/useHeadMeta.js'
|
|
14
14
|
import { useSectionViews } from '../hooks/useSectionViews.js'
|
|
15
15
|
import { buildSectionOverrides } from '@uniweb/theming'
|
|
16
|
+
import { carryQuery } from '@uniweb/core/resolve-route'
|
|
16
17
|
import { Default404 } from '../default-404.js'
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -190,13 +191,18 @@ export default function PageRenderer() {
|
|
|
190
191
|
|
|
191
192
|
useEffect(() => {
|
|
192
193
|
if (!redirectLocation) return
|
|
194
|
+
// ⭐ The query and fragment the visitor arrived with ride along, unless the destination names
|
|
195
|
+
// its own — a token a site's backend mails to the root (`/?verify=…`) reaches the page the root
|
|
196
|
+
// sends them to — and never onto another origin (`carryQuery`). ⛔ Until 2026-10-11 they were
|
|
197
|
+
// dropped here, before any code could read them.
|
|
198
|
+
const to = carryQuery(redirectLocation, { search: location.search, hash: location.hash }, window.location.origin)
|
|
193
199
|
// A URL with a scheme leaves the app — another site, or a locale's own domain.
|
|
194
|
-
if (/^[a-z][a-z0-9+.-]*:/i.test(
|
|
195
|
-
window.location.replace(
|
|
200
|
+
if (/^[a-z][a-z0-9+.-]*:/i.test(to)) {
|
|
201
|
+
window.location.replace(to)
|
|
196
202
|
} else {
|
|
197
|
-
navigate(
|
|
203
|
+
navigate(to, { replace: true })
|
|
198
204
|
}
|
|
199
|
-
}, [redirectLocation, navigate])
|
|
205
|
+
}, [redirectLocation, location.search, location.hash, navigate])
|
|
200
206
|
|
|
201
207
|
useHeadMeta(headMeta, { siteName })
|
|
202
208
|
|