Skip to content

Commit

Permalink
javascript is not perl
Browse files Browse the repository at this point in the history
  • Loading branch information
respinos committed Dec 19, 2023
1 parent a265ff7 commit 0ca89bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/scripts/textclass-proxy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async function processDLXS(req, res) {
if ( xmlData.indexOf('Location: ') > -1 ) {
console.log(xmlData);
let tmp = xmlData.match(/Location: (.*)$/si);
if ( tmp[1].startsWith('/') or tmp[1].startsWith('https://') ) {
if ( tmp[1].startsWith('/') || tmp[1].startsWith('https://') ) {
let domain = ( req.hostname == 'localhost' ) ? 'http://' : 'https://';
domain += req.hostname;
let href = tmp[1].trim().replace('https://roger.quod.lib.umich.edu/', '/' ).replace('debug=xml', 'debug=noop');
Expand Down

0 comments on commit 0ca89bd

Please sign in to comment.