Merge branch 'dev'
CI/CD / deploy (push) Successful in 2m24s Details

This commit is contained in:
Jeff Emmett 2026-04-16 16:58:03 -04:00
commit eea5d9f4e3
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,9 @@
services:
rspace:
image: rspace-online-rspace:latest
# CI pushes to localhost:3000/jeffemmett/rspace-online:<short-sha> and
# sets IMAGE_TAG via env when running `docker compose up -d --no-build`.
# Falls back to :latest for local rebuilds.
image: localhost:3000/jeffemmett/rspace-online:${IMAGE_TAG:-latest}
# build:
# context: .
# additional_contexts:

View File

@ -51,8 +51,14 @@ async function buildProjection(c: any) {
// Derive the public base URL from the request so in-timeline "Open in
// rApp" links resolve against the same origin the user arrived from.
// Default to https — rSpace always runs behind Cloudflare/Traefik TLS in
// production. Only fall back to http for loopback dev hosts.
const host = c.req.header('x-forwarded-host') ?? c.req.header('host');
const proto = c.req.header('x-forwarded-proto') ?? (host?.includes('localhost') ? 'http' : 'https');
const isLocal = !host || /^(localhost|127\.|\[::1\])/i.test(host);
const forwardedProto = c.req.header('x-forwarded-proto');
const proto = forwardedProto === 'http' || forwardedProto === 'https'
? forwardedProto
: (isLocal ? 'http' : 'https');
const baseUrl = host ? `${proto}://${host}` : undefined;
const sources = await enumerateCreations(space, { modules, from, to });