📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Canonical URLs for project view
Blue Mouse55e4ba60a7a6
diff --git a/web/app/routes/[robots.txt].tsx b/web/app/routes/[robots.txt].tsxindex 9dafa6c7d..adf41e285 100644--- a/web/app/routes/[robots.txt].tsx+++ b/web/app/routes/[robots.txt].tsx@@ -9,6 +9,11 @@ Disallow: /password-reset/*Disallow: /verify/*Disallow: /share/*Disallow: /change-email/*+Disallow: /3rd-party-unsubscribe/*+Disallow: /captchas/*+Disallow: /organisation/invite/*+Disallow: /project/transfer/*+Disallow: /reports-unsubscribe/*`const SELFHOSTED_ROBOTS = `User-agent: *diff --git a/web/app/routes/projects.$id.tsx b/web/app/routes/projects.$id.tsxindex 433562ed5..b838c9079 100644--- a/web/app/routes/projects.$id.tsx+++ b/web/app/routes/projects.$id.tsx@@ -2,7 +2,7 @@ import _split from 'lodash/split'import { type LinksFunction, type MetaFunction } from 'react-router'import { useRequiredParams } from '~/hooks/useRequiredParams'-import { API_URL } from '~/lib/constants'+import { API_URL, MAIN_URL } from '~/lib/constants'import ViewProject from '~/pages/Project/View'import { CurrentProjectProvider } from '~/providers/CurrentProjectProvider'import ProjectViewStyle from '~/styles/ProjectViewStyle.css?url'@@ -13,10 +13,12 @@ export const meta: MetaFunction = ({ location }) => {const { pathname } = locationconst pid = _split(pathname, '/')[2]const previewURL = `${API_URL}project/ogimage/${pid}`+ const canonicalURL = `${MAIN_URL}/projects/${pid}`return [{ property: 'og:image', content: previewURL },{ property: 'twitter:image', content: previewURL },+ { tagName: 'link', rel: 'canonical', href: canonicalURL },]}