Skip to content

Commit 6a44214

Browse files
authored
Merge pull request #443 from thefrontside/fix-meta-proxy
fix proxying meta content
2 parents 33073ac + 874add9 commit 6a44214

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

routes/proxy-route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function proxyRoute(options: ProxyRouteOptions): HTTPMiddleware {
6868
yield* injectMatomo(tree);
6969

7070
let elements = selectAll(
71-
'[href^="/"],[src^="/"],form[action],[http-equiv="refresh"][content]',
71+
'[href^="/"],[src^="/"],form[action],meta[content]',
7272
tree,
7373
);
7474

@@ -97,6 +97,8 @@ export function proxyRoute(options: ProxyRouteOptions): HTTPMiddleware {
9797
url,
9898
posixNormalize(`${base.pathname}${url}`),
9999
);
100+
} else if (properties.content.startsWith("http")) {
101+
properties.content = properties.content.replace(target.href, base.href.replace(/\/?$/,'/'));
100102
}
101103
}
102104
}

0 commit comments

Comments
 (0)