File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,9 @@ public Task<BaseResponse> Rpc(string procedureName, object? parameters) =>
249
249
public Task < TModeledResponse ? > Rpc < TModeledResponse > ( string procedureName , object ? parameters ) =>
250
250
_postgrest . Rpc < TModeledResponse > ( procedureName , parameters ) ;
251
251
252
+ /// <summary>
253
+ /// Produces dictionary of Headers that will be supplied to child clients.
254
+ ///</summary>
252
255
internal Dictionary < string , string > GetAuthHeaders ( )
253
256
{
254
257
var headers = new Dictionary < string , string >
@@ -257,9 +260,7 @@ internal Dictionary<string, string> GetAuthHeaders()
257
260
} ;
258
261
259
262
if ( _supabaseKey != null )
260
- {
261
263
headers [ "apiKey" ] = _supabaseKey ;
262
- }
263
264
264
265
// In Regard To: https://github.com/supabase/supabase-csharp/issues/5
265
266
if ( _options . Headers . TryGetValue ( "Authorization" , out var header ) )
@@ -272,14 +273,11 @@ internal Dictionary<string, string> GetAuthHeaders()
272
273
headers [ "Authorization" ] = $ "Bearer { bearer } ";
273
274
}
274
275
275
- // Add custom headers from options
276
- // This will overwrite any existing headers with the same key, not sure if that's the desired behavior
276
+ // Add supplied headers from `ClientOptions` by developer
277
277
foreach ( var kvp in _options . Headers )
278
- {
279
278
headers [ kvp . Key ] = kvp . Value ;
280
- }
281
279
282
280
return headers ;
283
281
}
284
282
}
285
- }
283
+ }
You can’t perform that action at this time.
0 commit comments