File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3236,6 +3236,7 @@ class File extends ServiceObject<File, FileMetadata> {
32363236 contentMd5 : cfg . contentMd5 ,
32373237 contentType : cfg . contentType ,
32383238 host : cfg . host ,
3239+ signingEndpoint : cfg . signingEndpoint ,
32393240 } ;
32403241
32413242 if ( cfg . cname ) {
Original file line number Diff line number Diff line change @@ -3794,11 +3794,30 @@ describe('File', () => {
37943794 contentType : config . contentType ,
37953795 cname : CNAME ,
37963796 virtualHostedStyle : true ,
3797+ signingEndpoint : undefined ,
37973798 } ) ;
37983799 done ( ) ;
37993800 } ) ;
38003801 } ) ;
38013802
3803+ it ( 'should pass signingEndpoint to URLSigner' , done => {
3804+ const signingEndpoint = 'https://my-endpoint.com' ;
3805+ const config = {
3806+ signingEndpoint,
3807+ ...SIGNED_URL_CONFIG ,
3808+ } ;
3809+
3810+ file . getSignedUrl ( config , ( err : Error | null ) => {
3811+ assert . ifError ( err ) ;
3812+ const getSignedUrlArgs = signerGetSignedUrlStub . getCall ( 0 ) . args ;
3813+ assert . strictEqual (
3814+ getSignedUrlArgs [ 0 ] [ 'signingEndpoint' ] ,
3815+ signingEndpoint
3816+ ) ;
3817+ done ( ) ;
3818+ } ) ;
3819+ } ) ;
3820+
38023821 it ( 'should add "x-goog-resumable: start" header if action is resumable' , done => {
38033822 SIGNED_URL_CONFIG . action = 'resumable' ;
38043823 SIGNED_URL_CONFIG . extensionHeaders = {
You can’t perform that action at this time.
0 commit comments