Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add embed-albums configuration to docs and web client

claude[bot]800bd973487d
diff --git a/docs/docs/self-hosting/installation/config.md b/docs/docs/self-hosting/installation/config.md
index e88a1dc9c1..656feaeeab 100644
--- a/docs/docs/self-hosting/installation/config.md
+++ b/docs/docs/self-hosting/installation/config.md
@@ -74,6 +74,7 @@ used for Compose and quickstart for ease of use.)
| -------------------- | ------------------------------------------------------- | -------------------------- |
| `apps.public-albums` | Albums app base endpoint for public sharing | `https://albums.ente.io` |
| `apps.cast` | Cast app base endpoint | `https://cast.ente.io` |
+| `apps.embed-albums` | Embed app base endpoint for embedded sharing | `https://embed.ente.io` |
| `apps.accounts` | Accounts app base endpoint (used for passkey-based 2FA) | `https://accounts.ente.io` |
### Database
diff --git a/server/config/example.yaml b/server/config/example.yaml
index 156f613d6e..c03e30a108 100644
--- a/server/config/example.yaml
+++ b/server/config/example.yaml
@@ -55,6 +55,7 @@ apps:
# set this to the URL where your albums web app is running.
public-albums: http://localhost:3002
cast: http://localhost:3004
+ embed-albums: http://localhost:3005
# Set this to the URL where your accounts web app is running, primarily used for
# passkey based 2FA.
accounts: http://localhost:3001
diff --git a/web/packages/new/photos/services/settings.ts b/web/packages/new/photos/services/settings.ts
index f08e82e297..c9615e4240 100644
--- a/web/packages/new/photos/services/settings.ts
+++ b/web/packages/new/photos/services/settings.ts
@@ -71,6 +71,17 @@ export interface Settings {
*/
castURL: string;
+ /**
+ * The URL for the embed app used for embedded sharing.
+ *
+ * Changing this only ever makes sense for self-hosters, who might want to
+ * point to their own self hosted embed app (See `apps.embed-albums` in
+ * `local.yaml` in the museum code).
+ *
+ * Default: "https://embed.ente.io"
+ */
+ embedURL: string;
+
/**
* Set to the domain (host, e.g. "photos.example.org") that the user wishes
* to use for sharing their public albums.
@@ -95,6 +106,7 @@ const createDefaultSettings = (): Settings => ({
mapEnabled: false,
cfUploadProxyDisabled: false,
castURL: "https://cast.ente.io",
+ embedURL: "https://embed.ente.io",
customDomainCNAME: "my.ente.io",
});
@@ -170,6 +182,7 @@ const FeatureFlags = z.object({
betaUser: z.boolean().nullish().transform(nullToUndefined),
mapEnabled: z.boolean().nullish().transform(nullToUndefined),
castUrl: z.string().nullish().transform(nullToUndefined),
+ embedUrl: z.string().nullish().transform(nullToUndefined),
customDomain: z.string().nullish().transform(nullToUndefined),
customDomainCNAME: z.string().nullish().transform(nullToUndefined),
});
@@ -183,6 +196,7 @@ const syncSettingsSnapshotWithLocalStorage = () => {
settings.mapEnabled = flags?.mapEnabled || false;
settings.cfUploadProxyDisabled = savedCFProxyDisabled();
if (flags?.castUrl) settings.castURL = flags.castUrl;
+ if (flags?.embedUrl) settings.embedURL = flags.embedUrl;
if (flags?.customDomain) settings.customDomain = flags.customDomain;
if (flags?.customDomainCNAME)
settings.customDomainCNAME = flags.customDomainCNAME;