File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ async function processDLXS(req, res) {
145
145
res . cookie ( 'DLXSsid' , cookieValue , { path : '/' } ) ;
146
146
console . log ( "AHOY AHOY cookie = " , cookieValue ) ;
147
147
}
148
- const xmlData = ( await resp . text ( ) ) . replace ( / h t t p s : \/ \/ l o c a l h o s t / g, 'http://localhost' ) ;
148
+ let xmlData = ( await resp . text ( ) ) . replace ( / h t t p s : \/ \/ l o c a l h o s t / g, 'http://localhost' ) ;
149
149
if ( xmlData . indexOf ( 'no hits. normally cgi redirects' ) > - 1 ) {
150
150
throw new Error ( 'Query has no results' ) ;
151
151
}
@@ -167,6 +167,8 @@ async function processDLXS(req, res) {
167
167
return ;
168
168
}
169
169
170
+ xmlData = xmlData . replaceAll ( 'roger.quod.lib.umich.edu' , req . headers [ 'x-forwarded-host' ] || 'localhost:5555' ) ;
171
+
170
172
if ( url . searchParams . get ( 'debug' ) == 'xml' ) {
171
173
res . setHeader ( "Content-Type" , "application/xml" ) ;
172
174
res . send ( xmlData ) ;
@@ -372,6 +374,7 @@ function listen(options) {
372
374
res . redirect ( redirectUrl ) ;
373
375
return ;
374
376
}
377
+ console . log ( "--?" , req . originalUrl ) ;
375
378
if ( isbot ( req . get ( 'user-agent' ) ) ) {
376
379
res . send ( "Beep boop" ) ;
377
380
return ;
You can’t perform that action at this time.
0 commit comments