Skip to content

Commit 7c7628a

Browse files
atarix83Mattia Vianelli
authored andcommitted
[DSC-2281] Fix regex in order to exclude bitstream id
(cherry picked from commit 593e35c6290895f128d3b13f66a80c38c0279885)
1 parent c0e2212 commit 7c7628a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,10 @@ function healthCheck(req, res) {
715715
function redirectManifest(req, res) {
716716
console.info('Redirecting old manifest');
717717
const url = req.url;
718-
const regex = /json\/iiif\/(.+?)\/manifest/;
718+
const regex = /json\/iiif\/([^\/]+\/[^\/]+)(?:\/([^\/]+))?\/manifest/;
719719
const match = url.match(regex);
720720
let handle;
721+
let id;
721722

722723
if (match) {
723724
handle = match[1];

0 commit comments

Comments
 (0)