From c9f522b24d7ebfef59ccbe4b3976f1b40f9f6707 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Fri, 31 Oct 2025 09:12:32 -0700 Subject: [PATCH 1/4] remove MySQL references from README --- README.md | 9 +-------- src/lib/db.ts | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fcbe856f1..6d166d8c8 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ A detailed getting started guide can be found at [umami.is/docs](https://umami.i ### Requirements - A server with Node.js version 18.18 or newer -- A database. Umami supports [MariaDB](https://www.mariadb.org/) (minimum v10.5), [MySQL](https://www.mysql.com/) (minimum v8.0) and [PostgreSQL](https://www.postgresql.org/) (minimum v12.14) databases. +- A database. Umami supports [PostgreSQL](https://www.postgresql.org/) (minimum v12.14) databases. ### Get the Source Code and Install Packages @@ -58,7 +58,6 @@ The connection URL format: ```bash postgresql://username:mypassword@localhost:5432/mydb -mysql://username:mypassword@localhost:3306/mydb ``` ### Build the Application @@ -93,12 +92,6 @@ Alternatively, to pull just the Umami Docker image with PostgreSQL support: docker pull docker.umami.is/umami-software/umami:postgresql-latest ``` -Or with MySQL support: - -```bash -docker pull docker.umami.is/umami-software/umami:mysql-latest -``` - --- ## 🔄 Getting Updates diff --git a/src/lib/db.ts b/src/lib/db.ts index 0ffedd0d8..72a18c062 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -1,6 +1,5 @@ export const PRISMA = 'prisma'; export const POSTGRESQL = 'postgresql'; -export const MYSQL = 'mysql'; export const CLICKHOUSE = 'clickhouse'; export const KAFKA = 'kafka'; export const KAFKA_PRODUCER = 'kafka-producer'; @@ -31,7 +30,7 @@ export async function runQuery(queries: any) { const db = getDatabaseType(); - if (db === POSTGRESQL || db === MYSQL) { + if (db === POSTGRESQL) { return queries[PRISMA](); } } From 684863d6c7d6c9d7de247cf8119b6fcd32bb39e0 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Mon, 3 Nov 2025 16:44:01 -0800 Subject: [PATCH 2/4] Added laptop detection. Reorganized IP headers. --- src/lib/detect.ts | 14 +++++++++++--- src/lib/ip.ts | 19 ++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/lib/detect.ts b/src/lib/detect.ts index 16ff97da2..c5528465d 100644 --- a/src/lib/detect.ts +++ b/src/lib/detect.ts @@ -30,10 +30,18 @@ const PROVIDER_HEADERS = [ }, ]; -export function getDevice(userAgent: string) { +export function getDevice(userAgent: string, screen: string = '') { const { device } = UAParser(userAgent); - return device?.type || 'desktop'; + const [width] = screen.split('x'); + + const type = device?.type || 'desktop'; + + if (type === 'desktop' && screen && +width <= 1920) { + return 'laptop'; + } + + return type; } function getRegionCode(country: string, region: string) { @@ -108,7 +116,7 @@ export async function getClientInfo(request: Request, payload: Record Date: Mon, 3 Nov 2025 16:54:58 -0800 Subject: [PATCH 3/4] Updated Dockerfile to match current Prisma version. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ddde77fc5..39887e465 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN set -x \ && apk add --no-cache curl # Script dependencies -RUN pnpm add npm-run-all dotenv chalk semver prisma@6.16.3 @prisma/adapter-pg@6.16.3 +RUN pnpm add npm-run-all dotenv chalk semver prisma@6.18.0 @prisma/adapter-pg@6.18.0 # Permissions for prisma RUN chown -R nextjs:nodejs node_modules/.pnpm/ From 5398cd89fe7d4d27efc8d96a720e1d217954a43e Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Mon, 3 Nov 2025 21:01:12 -0800 Subject: [PATCH 4/4] Reordered IP headers. --- src/lib/ip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ip.ts b/src/lib/ip.ts index a818f03d7..9e0f99109 100644 --- a/src/lib/ip.ts +++ b/src/lib/ip.ts @@ -1,9 +1,9 @@ export const IP_ADDRESS_HEADERS = [ - 'x-real-ip', + 'true-client-ip', // CDN + 'x-real-ip', // Reverse proxy 'x-forwarded-for', 'cf-connecting-ip', // Cloudflare 'fastly-client-ip', // Fastly - 'true-client-ip', // Akamai 'x-nf-client-connection-ip', // Netlify 'do-connecting-ip', // Digital Ocean 'x-appengine-user-ip', // Google App Ending