We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9701fb5 commit b67abc1Copy full SHA for b67abc1
src/server/createCanonicalPath.ts
@@ -1,6 +1,9 @@
1
-import { FULL_DOMAIN } from '@/utils/constants'
+import { DOMAIN, BASE_PATH } from '@/utils/constants'
2
3
export const createCanonicalPath = (path: string[]) => {
4
- const canonicalPath = `${FULL_DOMAIN}/${path.join('/')}`
5
- return canonicalPath
+ const urlPath = [BASE_PATH, ...path].join('/')
+ const canonicalUrl = new URL(urlPath, DOMAIN)
6
+ const href = canonicalUrl.href
7
+
8
+ return href
9
}
0 commit comments