@@ -76,18 +76,18 @@ function extractSpaceDID (space) {
7676export function withAuthorizedSpace ( handler ) {
7777 return async ( request , env , ctx ) => {
7878 const { locator, dataCid } = ctx
79-
79+
8080 console . log ( `[withAuthorizedSpace] Locating content: ${ dataCid } ` )
8181 const locRes = await locator . locate ( dataCid . multihash )
8282 if ( locRes . error ) {
83- console . log ( ` [withAuthorizedSpace] Location failed:` , locRes . error )
83+ console . log ( ' [withAuthorizedSpace] Location failed:' , locRes . error )
8484 if ( locRes . error . name === 'NotFound' ) {
8585 throw new HttpError ( 'Not Found' , { status : 404 , cause : locRes . error } )
8686 }
8787 throw new Error ( `failed to locate: ${ dataCid } ` , { cause : locRes . error } )
8888 }
8989
90- console . log ( ` [withAuthorizedSpace] Location result:` , {
90+ console . log ( ' [withAuthorizedSpace] Location result:' , {
9191 sites : locRes . ok . site . length ,
9292 spaces : locRes . ok . site . map ( s => s . space ) . filter ( Boolean )
9393 } )
@@ -104,7 +104,7 @@ export function withAuthorizedSpace (handler) {
104104 ctx . authToken === null
105105
106106 if ( shouldServeLegacy ) {
107- console . log ( ` [withAuthorizedSpace] Using legacy path (no space)` )
107+ console . log ( ' [withAuthorizedSpace] Using legacy path (no space)' )
108108 return handler ( request , env , ctx )
109109 }
110110
@@ -122,7 +122,7 @@ export function withAuthorizedSpace (handler) {
122122 console . log ( `Content found in ${ uniqueSpaces . length } different spaces - egress tracking will be skipped` )
123123 console . log ( `Spaces: ${ uniqueSpaces . join ( ', ' ) } ` )
124124 }
125-
125+
126126 console . log ( `[withAuthorizedSpace] Found ${ spaces . length } space(s):` , spaces )
127127
128128 try {
@@ -202,19 +202,18 @@ const authorize = async (space, ctx, env) => {
202202 return fail ( 'The gateway is not authorized to serve this content.' )
203203 }
204204
205-
206205 // Get the content serve authority (upload service) from environment
207206 // @ts -ignore - env has these properties from wrangler.toml
208207 // const contentServeAuthority =
209208 // env.CONTENT_SERVE_AUTHORITY_PUB_KEY && env.CONTENT_SERVE_AUTHORITY_DID
210- // ?
209+ // ?
211210 // // @ts -ignore
212211 // Verifier.parse(env.CONTENT_SERVE_AUTHORITY_PUB_KEY).withDID(
213212 // // @ts -ignore
214213 // env.CONTENT_SERVE_AUTHORITY_DID
215214 // )
216215 // : ctx.gatewayIdentity
217-
216+
218217 // Create an invocation of the serve capability.
219218 const invocation = await serve . transportHttp
220219 . invoke ( {
0 commit comments