Compare commits
2 Commits
2ca93caa7e
...
eea5d9f4e3
| Author | SHA1 | Date |
|---|---|---|
|
|
eea5d9f4e3 | |
|
|
317e7a5579 |
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Reference in New Issue