File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 145145 if ( Uri . IsWellFormedUriString ( connectionString , UriKind . Absolute ) )
146146 {
147147 // If the connection string is a URI, use it directly
148- return new BlobServiceClient ( new Uri ( connectionString ) , new DefaultAzureCredential ( ) ) ;
148+ var options = new DefaultAzureCredentialOptions
149+ {
150+ ManagedIdentityClientId = builder . Configuration [ "AZURE_CLIENT_ID" ]
151+ } ;
152+
153+ var credential = new DefaultAzureCredential ( options ) ;
154+ return new BlobServiceClient ( new Uri ( connectionString ) , credential ) ;
155+
149156 }
150157 else
151158 {
204211 // Set headers to ensure proper cache behavior for bundled files
205212 context . Response . OnStarting ( ( ) =>
206213 {
207- context . Response . Headers . CacheControl = "public,max-age=31536000,immutable" ;
208- context . Response . Headers . Vary = "Accept-Encoding" ;
209- return Task . CompletedTask ;
210- } ) ;
214+ context . Response . Headers . CacheControl = "public,max-age=31536000,immutable" ;
215+ context . Response . Headers . Vary = "Accept-Encoding" ;
216+ return Task . CompletedTask ;
217+ } ) ;
211218 }
212219 await next ( ) ;
213220 } ) ;
You can’t perform that action at this time.
0 commit comments