Skip to content

Commit a76fa29

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

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
@@ -716,9 +716,10 @@ function healthCheck(req, res) {
716716
function redirectManifest(req, res) {
717717
console.info('Redirecting old manifest');
718718
const url = req.url;
719-
const regex = /json\/iiif\/(.+?)\/manifest/;
719+
const regex = /json\/iiif\/([^\/]+\/[^\/]+)(?:\/([^\/]+))?\/manifest/;
720720
const match = url.match(regex);
721721
let handle;
722+
let id;
722723

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

0 commit comments

Comments
 (0)