@@ -37,11 +37,20 @@ public async Task<IActionResult> GetStoreMeta(string storeId, CancellationToken
3737 return NotFound ( ) ;
3838 }
3939
40- return Ok ( ) ;
40+ HttpContext . Response . Headers . TryGetValue ( "X-Synced" , out var isSynced ) ;
41+ if ( isSynced == "True" )
42+ {
43+ return Ok ( ) ;
44+ }
45+ else
46+ {
47+ return NotFound ( ) ;
48+ }
4149 }
4250 catch ( Exception ex )
4351 {
44- HttpContext . Response . Headers . TryAdd ( "X-error" , ex . Message . ToString ( ) ) ;
52+ HttpContext . Response . Headers . TryAdd ( "X-Synced" , false . ToString ( ) ) ;
53+ HttpContext . Response . Headers . TryAdd ( "X-Error" , ex . Message . ToString ( ) ) ;
4554 return NotFound ( ) ;
4655 }
4756 }
@@ -75,11 +84,20 @@ public async Task<IActionResult> GetResourceMeta(string storeId, string catchAll
7584 }
7685 }
7786
78- return Ok ( ) ;
87+ HttpContext . Response . Headers . TryGetValue ( "X-Synced" , out var isSynced ) ;
88+ if ( isSynced == "True" )
89+ {
90+ return Ok ( ) ;
91+ }
92+ else
93+ {
94+ return NotFound ( ) ;
95+ }
7996 }
8097 catch ( Exception ex )
8198 {
82- HttpContext . Response . Headers . TryAdd ( "X-error" , ex . Message . ToString ( ) ) ;
99+ HttpContext . Response . Headers . TryAdd ( "X-Synced" , false . ToString ( ) ) ;
100+ HttpContext . Response . Headers . TryAdd ( "X-Error" , ex . Message . ToString ( ) ) ;
83101 return NotFound ( ) ;
84102 }
85103 }
@@ -311,8 +329,6 @@ private bool ViewExists(string name)
311329 input = input . TrimEnd ( '/' ) . TrimStart ( '/' ) ;
312330 input = input . Contains ( "%24" ) ? Uri . UnescapeDataString ( input ) : input ;
313331
314- HttpContext . Response . Headers . TryAdd ( "X-Input" , input ) ;
315-
316332 int atIndex = input . IndexOf ( '$' ) ;
317333 string storeId = atIndex == - 1 ? input : input . Substring ( 0 , atIndex ) ;
318334 string ? rootHash = atIndex == - 1 ? "latest" : input . Substring ( atIndex + 1 ) ;
0 commit comments