π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline photos app origin
Manav Rathi7013b4193d55
diff --git a/web/apps/accounts/.env.development b/web/apps/accounts/.env.developmentindex fc9e8d54ef..e2ea2bc8ae 100644--- a/web/apps/accounts/.env.development+++ b/web/apps/accounts/.env.development@@ -1,7 +1,6 @@-# Copy this file into `.env.local` and uncomment these to develop against apps+# Copy this file into `.env.local` and uncomment this to develop against apps# and server running on localhost.## For details, please see `apps/photos/.env.development`#NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080-#NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002diff --git a/web/apps/albums/.env b/web/apps/albums/.envindex c05778126e..39f4bf1433 100644--- a/web/apps/albums/.env+++ b/web/apps/albums/.env@@ -3,20 +3,10 @@ NEXT_TELEMETRY_DISABLED = 1# For details on how Next.js loads environment files in this repo, see# `apps/photos/.env`.#-# The albums app supports the same endpoint-related variables as the photos-# app:+# The albums app supports the same endpoint-related variable as the photos app:## - `NEXT_PUBLIC_ENTE_ENDPOINT` for the API origin.-# - `NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT` for the externally visible albums origin.-# - `NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT` for the photos app origin used when-# handing off join/login flows.## Example:## NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080-# NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002-# NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT = http://localhost:3000-#-# Set this only when building Ente's official production albums deployment.-#-# NEXT_PUBLIC_ENTE_OFFICIAL_ALBUMS_APP = 1diff --git a/web/apps/albums/.env.development b/web/apps/albums/.env.developmentindex be4c929ad4..a99c8bb974 100644--- a/web/apps/albums/.env.development+++ b/web/apps/albums/.env.development@@ -1,8 +1,6 @@# Copy this file into `.env.local` or `.env.development.local` and uncomment-# these to develop against apps and server running on localhost.+# this to develop against apps and server running on localhost.## For details, please see `apps/photos/.env.development` and `apps/albums/.env`.#NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080-#NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002-#NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT = http://localhost:3000diff --git a/web/apps/albums/src/public-album/access/services/join-public-album-redirect.ts b/web/apps/albums/src/public-album/access/services/join-public-album-redirect.tsindex f4689424e6..30b727aacc 100644--- a/web/apps/albums/src/public-album/access/services/join-public-album-redirect.ts+++ b/web/apps/albums/src/public-album/access/services/join-public-album-redirect.ts@@ -1,5 +1,4 @@import type { PublicAlbumsCredentials } from "ente-base/http";-import { photosAppOrigin } from "ente-base/origins";import type { Collection } from "ente-media/collection";import type { RefObject } from "react";@@ -19,9 +18,8 @@ const buildWebRedirectURL = (currentHash: string,jwtToken?: string,): string => {- const webAppURL = photosAppOrigin();const hashSuffix = jwtToken ? `&jwt=${encodeURIComponent(jwtToken)}` : "";- return `${webAppURL}/?joinAlbum=${accessToken}&collectionId=${collectionId}#${currentHash}${hashSuffix}`;+ return `https://photos.ente.com/?joinAlbum=${accessToken}&collectionId=${collectionId}#${currentHash}${hashSuffix}`;};/**diff --git a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsxindex 0d032be0f4..3d6d3cd0cb 100644--- a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx+++ b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx@@ -74,11 +74,7 @@ import {type PublicAlbumsCredentials,} from "ente-base/http";import log from "ente-base/log";-import {- apiOrigin,- isCustomAPIOrigin,- photosAppOrigin,-} from "ente-base/origins";+import { apiOrigin, isCustomAPIOrigin } from "ente-base/origins";import type { Collection } from "ente-media/collection";import { type EnteFile } from "ente-media/file";import { fileFileName } from "ente-media/file-metadata";@@ -243,7 +239,7 @@ export default function PublicAlbumPage() {if (isCustomAPIOrigin) {await router.push("/");} else {- window.location.href = photosAppOrigin();+ window.location.href = "https://photos.ente.com";}},},diff --git a/web/apps/photos/.env b/web/apps/photos/.envindex bcabe0dc3e..9a1663166b 100644--- a/web/apps/photos/.env+++ b/web/apps/photos/.env@@ -41,28 +41,6 @@## NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080-# The URL for the public albums deployment-#-# Public album and file links are served by the dedicated albums app. During-# local development, you can run it using `yarn dev:albums` on port 3002.-#-# Set this if you want the photos app to hand public links off to a non-default-# albums origin, for example when self-hosting or when previewing the local-# photos -> albums flow.-#-# Note: To use your custom albums endpoint in the generated public link, set the-# `apps.public-albums` property in museum's configuration.-#-# NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002--# The URL for the photos app deployment-#-# The default is "https://photos.ente.com", but this can be customized for local-# development or self-hosting. For example, you can set this to-# http://localhost:3000 when developing locally.-#-# NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT = http://localhost:3000-# The JSON which describes the expected results of our integration tests. See# `upload.test.ts` for more details of the expected format.#diff --git a/web/apps/photos/.env.development b/web/apps/photos/.env.developmentindex 9d4faa5400..230e5681bd 100644--- a/web/apps/photos/.env.development+++ b/web/apps/photos/.env.development@@ -10,16 +10,3 @@##NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080--# If you wish to preview the public albums flow locally, you can also uncomment-# this and run two apps:-#-# - `yarn dev:photos` (the main app)-# - `yarn dev:albums` (the separate albums app)--#NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002--# If you also want to customize the photos app origin (defaults to-# https://photos.ente.com), you can uncomment this:--#NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT = http://localhost:3000diff --git a/web/packages/base/origins.ts b/web/packages/base/origins.tsindex 903e99fb8a..03cf3b6142 100644--- a/web/packages/base/origins.ts+++ b/web/packages/base/origins.ts@@ -86,8 +86,3 @@ export const customAPIHost = async () => {*/export const uploaderOrigin = async () =>(await customAPIOrigin()) ?? "https://uploader.ente.com";--/**- * Return the origin that serves Ente's official photos app.- */-export const photosAppOrigin = (): string => "https://photos.ente.com";