Skip to content

Commit

Permalink
Fix authorization header validation to handle bearer types correctly …
Browse files Browse the repository at this point in the history
…- "authorization config header is required" error (langgenius#6040)
  • Loading branch information
75py authored Jul 7, 2024
1 parent 3ec80f9 commit 610da4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/workflow/nodes/http_request/http_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _assembling_headers(self) -> dict[str, Any]:
raise ValueError('self.authorization config is required')
if authorization.config is None:
raise ValueError('authorization config is required')
if authorization.config.header is None:
if authorization.config.type != 'bearer' and authorization.config.header is None:
raise ValueError('authorization config header is required')

if self.authorization.config.api_key is None:
Expand Down

0 comments on commit 610da4f

Please sign in to comment.