Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/homepage/commit/d82fbc3026b1dd1c50d8d75f6d73e598b3dc0f41
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
8 additions and
2 deletions
@ -23,7 +23,7 @@ export default async function genericProxyHandler(req, res, map) {
formatApiCall ( widgets [ widget . type ] . api , { endpoint , ... widget } ) . replace ( /(?<=\?.*)\?/g , "&" ) ,
) ;
const headers = req . extraHeaders ? ? widget . headers ? ? { } ;
const headers = req . extraHeaders ? ? widget . headers ? ? widgets [ widget . type ] . headers ? ? { } ;
if ( widget . username && widget . password ) {
headers . Authorization = ` Basic ${ Buffer . from ( ` ${ widget . username } : ${ widget . password } ` ) . toString ( "base64" ) } ` ;
@ -75,7 +75,13 @@ export default async function genericProxyHandler(req, res, map) {
url . port ? ` : ${ url . port } ` : "" ,
url . pathname ,
) ;
return res . status ( status ) . json ( { error : { message : "HTTP Error" , url : sanitizeErrorURL ( url ) , resultData } } ) ;
return res . status ( status ) . json ( {
error : {
message : "HTTP Error" ,
url : sanitizeErrorURL ( url ) ,
resultData : Buffer . isBuffer ( resultData ) ? Buffer . from ( resultData ) . toString ( ) : resultData ,
} ,
} ) ;
}
return res . status ( status ) . send ( resultData ) ;