Skip to content

feat(ui): self-hosted Umami analytics - #595

Merged
JSONbored merged 3 commits into
mainfrom
feat/umami-analytics
Jun 11, 2026
Merged

feat(ui): self-hosted Umami analytics#595
JSONbored merged 3 commits into
mainfrom
feat/umami-analytics

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Adds the privacy-friendly self-hosted Umami tracking tag (tasty.aethereal.dev) as a deferred head script in __root.tsx. Cookieless, no PII.

Privacy-friendly, cookieless analytics via the self-hosted Umami instance at
tasty.aethereal.dev. Added as a deferred head script in the root route; no CSP to
update (none configured). No PII, no cookies.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui d01fbde Commit Preview URL

Branch Preview URL
Jun 11 2026, 08:52 AM

@dosubot dosubot Bot added the size:XS label Jun 11, 2026
@ghost

ghost commented Jun 11, 2026

Copy link
Copy Markdown

reviewbot · verdict: comment

This PR introduces a first-party reverse proxy for the self-hosted Umami tracker, allowing the browser to only communicate with the Gittensory origin while still forwarding requests to the Umami host. The code is well-organized and follows best practices.

Suggestions

  • Consider adding tests for the handleAnalyticsProxy function to ensure it handles different scenarios correctly
  • Add documentation for the ANALYTICS_PREFIX and ROUTES constants to explain their purpose and usage

Worth double-checking

  • Double-check that the STRIP_REQUEST_HEADERS and STRIP_RESPONSE_HEADERS sets are comprehensive and do not inadvertently forward sensitive information
  • Verify that the proxy does not introduce any security vulnerabilities, such as allowing unauthorized access to the Umami host

Before = production · After = this PR's preview deploy.

Route Before After
/ before after

@ghost

ghost commented Jun 11, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #595 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superagent found 1 security concern(s).

Comment thread apps/gittensory-ui/src/routes/__root.tsx Outdated
@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 11, 2026
Superagent flagged the Umami <script> as loaded cross-origin from
tasty.aethereal.dev without Subresource Integrity (P2).

Rather than pin an SRI hash that silently breaks analytics on every
self-hosted Umami upgrade, proxy the tracker through our own Worker
origin. The browser now only talks to gittensory.aethereal.dev:

  GET  /stats/script.js -> tasty.aethereal.dev/script.js
  POST /stats/api/send  -> tasty.aethereal.dev/api/send

The tracker derives its collect endpoint from its own <script src>
directory, so serving it at /stats/script.js makes it POST to
/stats/api/send on its own — no data-host-url needed.

The proxy is a strict path allowlist (script.js + api/send only) so it
can't be abused as an open proxy onto Umami's same-origin admin/auth
API, strips cookies/hop-by-hop headers, forwards the real client IP for
geolocation, and fails closed (502) without taking the page down.
@dosubot dosubot Bot added size:L and removed size:XS labels Jun 11, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant