File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
gitbook-v2/src/lib/images Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export function createImageResizer({
66
66
linker . toAbsoluteURL ( linker . toPathInContent ( '/~gitbook/image' ) )
67
67
) ;
68
68
url . searchParams . set ( 'url' , getImageAPIUrl ( urlInput ) ) ;
69
+ url . searchParams . set ( 'host' , host ) ;
69
70
70
71
if ( options . width ) {
71
72
url . searchParams . set ( 'width' , options . width . toString ( ) ) ;
Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ export async function serveResizedImage(request: Request) {
45
45
{ signature, version : signatureVersion }
46
46
) ;
47
47
if ( ! verified ) {
48
- return new Response ( `Invalid signature "${ signature ?? '' } " for "${ url } "` , { status : 400 } ) ;
48
+ return new Response (
49
+ `Invalid signature "${ signature ?? '' } " (version ${ signatureVersion } ) for "${ url } " on "${ requestURL . host } "` ,
50
+ { status : 400 }
51
+ ) ;
49
52
}
50
53
51
54
if ( signatureVersion !== CURRENT_SIGNATURE_VERSION ) {
You can’t perform that action at this time.
0 commit comments