Skip to content

armgit / ente

Public Imported from GitHub
0

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

Alias

Manav Rathi9a7ba8a40693
diff --git a/web/packages/shared/network/api.ts b/web/packages/shared/network/api.ts
index 3cda6b615d..7ba49ec960 100644
--- a/web/packages/shared/network/api.ts
+++ b/web/packages/shared/network/api.ts
@@ -1,3 +1,13 @@
+/**
+ * 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.
+ */
+export const apiOrigin = () => getEndpoint();
+
export const getEndpoint = () => {
const endpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT;
if (endpoint) {