openvibers/openvibe.news Commits

News: the sign-in link carries the path only (#129)

OP OpenVibers committed 15 days ago · c7e78f2be1 · 1 file, +3 −1

o.path is the whole requested URL, so a page opened with a query put those words into the shared
navbar's sign-in link and the footer's page path. The link now takes the path part, as the
canonical already did.

Changes

ddiff --git a/server/render/layout.js b/server/render/layout.js
iindex 13cfc66..97d3ffb 100644
---- a/server/render/layout.js
++++ b/server/render/layout.js
@@@ -54,7 +54,9 @@ function renderPage(o) {
if (!o.decision) throw new TypeError('renderPage needs the gate decision');
const viewer = o.viewer || { kind: 'anonymous' };
const signedIn = viewer.kind === 'user';
-- const loginNext = encodeURIComponent(o.path || '/');
++ // The path without its query: o.path is often the whole requested URL, and a sign-in link that echoed
++ // the query would put the page's words into every page of the site (SEO-7 review, 2026-10-29).
++ const loginNext = encodeURIComponent(String(o.path || '/').split('?')[0] || '/');
const nav = {
service: 'news',
apiBase: NETWORK_URL,