diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a0a337..f994fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.1-alpha.31](https://github.com/DIG-Network/dig-content-server/compare/v0.0.1-alpha.30...v0.0.1-alpha.31) (2024-09-18) + ### [0.0.1-alpha.30](https://github.com/DIG-Network/dig-content-server/compare/v0.0.1-alpha.29...v0.0.1-alpha.30) (2024-09-17) diff --git a/package-lock.json b/package-lock.json index 1962f33..57718ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dig-content-server", - "version": "0.0.1-alpha.30", + "version": "0.0.1-alpha.31", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dig-content-server", - "version": "0.0.1-alpha.30", + "version": "0.0.1-alpha.31", "license": "ISC", "dependencies": { "@dignetwork/dig-sdk": "^0.0.1-alpha.21", diff --git a/package.json b/package.json index ee9d2c2..450fba5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dig-content-server", - "version": "0.0.1-alpha.30", + "version": "0.0.1-alpha.31", "description": "", "type": "commonjs", "main": "./dist/index.js", diff --git a/src/middleware/parseUdi.ts b/src/middleware/parseUdi.ts index 18cf23c..bc1e062 100644 --- a/src/middleware/parseUdi.ts +++ b/src/middleware/parseUdi.ts @@ -23,6 +23,8 @@ export const parseUdi = async ( let storeId: string = ""; let rootHash: string | null = null; + + // Extract the first path part as the storeId (assumed app identifier) const pathSegment = req.params.storeId || ""; // Expecting storeId to be the first path segment const originalPathSegments = req.originalUrl.split("/").slice(2); // Remove the first segment, which is the storeId part @@ -50,6 +52,9 @@ export const parseUdi = async ( storeId = parts[0]; } + + console.log(req.originalUrl); + // Check for the edge case where the first and second path parts are the same if (originalPathSegments.length > 1 && storeId.length >= 64) { const secondPathPart = originalPathSegments[0];