π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
files origin
Manav Rathiefcf36ea4e51
diff --git a/web/packages/shared/network/api.ts b/web/packages/shared/network/api.tsindex 7ba49ec960..c279c8cb05 100644--- a/web/packages/shared/network/api.ts+++ b/web/packages/shared/network/api.ts@@ -2,9 +2,9 @@* Return the origin (scheme, host, port triple) that should be used for making* API requests to museum.*- * This defaults to api.ente.io, Ente's own servers, but can be overridden when- * running locally by setting the `NEXT_PUBLIC_ENTE_ENDPOINT` environment- * variable.+ * This defaults to "https://api.ente.io", Ente's own servers, but can be+ * overridden when self hosting by setting the `NEXT_PUBLIC_ENTE_ENDPOINT`+ * environment variable.*/export const apiOrigin = () => getEndpoint();@@ -16,6 +16,16 @@ export const getEndpoint = () => {return "https://api.ente.io";};+/**+ * Return the origin that should be used for fetching files.+ *+ * This defaults to "https://files.ente.io", Ente's own servers, but can be+ * overridden when self hosting by setting the `NEXT_PUBLIC_ENTE_ENDPOINT`+ * environment variable.+ */+export const filesOrigin = () =>+ process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "https://files.ente.io"+export const getFileURL = (id: number) => {const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;if (endpoint) {