Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Pass true Client IP to /items/{uuid}
Just like we were doing for the manifest, pass this through as the
forwarded header to make sure locations restrictions work as expected.
  • Loading branch information
sarangj committed Sep 15, 2025
commit f4c28f96315b54f54893b3bf121a2b749c5911fd
3 changes: 2 additions & 1 deletion app/items/[uuid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const getItemManifest = async (uuid: string) => {
};

const getItemData = async (uuid: string) => {
const clientIP = await getClientIP();
try {
return await CollectionsApi.getItemData(uuid);
return await CollectionsApi.getItemData(uuid, clientIP);
} catch (error: any) {
return null;
}
Expand Down
7 changes: 5 additions & 2 deletions app/src/utils/apiClients/apiClients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,13 @@ export class CollectionsApi {
});
}

static async getItemData(uuid: string): Promise<APIItem> {
static async getItemData(
uuid: string,
clientIP: string | null
): Promise<APIItem> {
return await fetchApi({
apiUrl: `${process.env.COLLECTIONS_API_URL}/items/${uuid}`,
options: { isRepoApi: false },
options: { isRepoApi: false, clientIP: clientIP },
});
}

Expand Down