File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,21 @@ test('GET / returns links with the correct endpoint if `X-STAC-Endpoint` is set'
100100 t . is ( apiLink . href , `${ url } /api` )
101101} )
102102
103+ test ( 'GET / returns links with the correct endpoint if `STAC-Endpoint` is set' , async ( t ) => {
104+ const url = `http://${ randomId ( ) } .local`
105+
106+ const response = await t . context . api . client . get ( '' , {
107+ headers : {
108+ 'STAC-Endpoint' : url
109+ }
110+ } )
111+
112+ const apiLink = response . links . find ( ( l ) => l . rel === 'service-desc' )
113+
114+ t . not ( apiLink , undefined )
115+ t . is ( apiLink . href , `${ url } /api` )
116+ } )
117+
103118test ( 'GET / returns a compressed response if ENABLE_RESPONSE_COMPRESSION' , async ( t ) => {
104119 const response = await t . context . api . client . get ( '' , { resolveBodyOnly : false } )
105120
You can’t perform that action at this time.
0 commit comments