Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0be93d088b | ||
|
|
832e7265c9 |
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [0.6.9](https://github.com/ginnoir/famapp/compare/v0.6.8...v0.6.9) (2026-07-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- build share urls from auth_url instead of localhost ([832e726](https://github.com/ginnoir/famapp/commit/832e7265c9354edf86f28f72f129ee34da8c3d04))
|
||||
|
||||
## [0.6.8](https://github.com/ginnoir/famapp/compare/v0.6.7...v0.6.8) (2026-07-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -16,7 +16,9 @@ ENV CI=true
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV DATABASE_URL=postgres://build:build@localhost:5432/build
|
||||
ENV AUTH_SECRET=build-time-placeholder
|
||||
# Build-only placeholder. Runtime public URL is AUTH_URL from stack.env — never prefer this.
|
||||
ENV NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||
ENV AUTH_URL=http://localhost:3000
|
||||
COPY . .
|
||||
RUN pnpm install --offline --frozen-lockfile
|
||||
RUN --mount=type=cache,id=famapp-nextjs,target=/app/.next/cache \
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "famapp",
|
||||
"version": "0.6.8",
|
||||
"version": "0.6.9",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@10.33.3",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/** Public origin for absolute links. AUTH_URL wins — Docker build sets NEXT_PUBLIC to localhost. */
|
||||
export function getAppPublicUrl(): string {
|
||||
const raw =
|
||||
process.env.AUTH_URL?.trim() ||
|
||||
process.env.NEXT_PUBLIC_APP_URL?.trim() ||
|
||||
"http://localhost:3000";
|
||||
return raw.replace(/\/$/, "");
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createHash, randomBytes } from "crypto";
|
||||
import { and, eq, isNull } from "drizzle-orm";
|
||||
import type { ApiAuthContext } from "@/lib/api-auth";
|
||||
import { getAppPublicUrl } from "@/lib/app-url";
|
||||
import { db } from "@/lib/db";
|
||||
import { getEntityType, getRegistry } from "./registry";
|
||||
import { shareLinks } from "./schema";
|
||||
@@ -27,9 +28,7 @@ function hashToken(raw: string): string {
|
||||
}
|
||||
|
||||
function buildUrl(token: string): string {
|
||||
const base =
|
||||
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
|
||||
return `${base}/s/${token}`;
|
||||
return `${getAppPublicUrl()}/s/${token}`;
|
||||
}
|
||||
|
||||
export function listShareableEntityTypes() {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { createHash, randomBytes } from "crypto";
|
||||
import { and, eq, isNull } from "drizzle-orm";
|
||||
import { getAppPublicUrl } from "@/lib/app-url";
|
||||
import { db } from "@/lib/db";
|
||||
import { getCurrentSession } from "@/lib/session";
|
||||
import { getEntityType } from "./registry";
|
||||
@@ -21,9 +22,7 @@ function hashToken(raw: string): string {
|
||||
}
|
||||
|
||||
function buildUrl(token: string): string {
|
||||
const base =
|
||||
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
|
||||
return `${base}/s/${token}`;
|
||||
return `${getAppPublicUrl()}/s/${token}`;
|
||||
}
|
||||
|
||||
export async function createShareLink(
|
||||
|
||||
Reference in New Issue
Block a user