1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-19 15:29:59 +00:00

fix: meta og:url should use the origin of the request instead of elk.zone (#2550)

This commit is contained in:
Joshix-1 2024-01-09 08:14:35 +00:00 committed by GitHub
parent 3fa1fc349c
commit d8ea685803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,9 +5,11 @@ provideGlobalCommands()
const route = useRoute() const route = useRoute()
if (process.server && !route.path.startsWith('/settings')) { if (process.server && !route.path.startsWith('/settings')) {
const url = useRequestURL()
useHead({ useHead({
meta: [ meta: [
{ property: 'og:url', content: `https://elk.zone${route.path}` }, { property: 'og:url', content: `${url.origin}${route.path}` },
], ],
}) })
} }