Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix authorization header validation to handle bearer types correctly - "authorization config header is required" error #6040

Merged

Conversation

75py
Copy link
Contributor

@75py 75py commented Jul 7, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

This pull request fixes the issue with authorization header validation to handle bearer types correctly. The validation logic is modified to check for the authorization config header only for non-bearer types. This ensures that the bearer authorization configurations are handled properly.

Fixes #6033

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

To verify the changes, please follow these steps:

  • Configure an HTTP node with Bearer authorization and ensure it works as expected.
  • Configure an HTTP node with a non-bearer authorization type and ensure the appropriate error message is displayed if the header is missing.

- Modify validation logic to check for authorization config header only for non-bearer types.
- This ensures proper handling of bearer authorization configurations.
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 7, 2024
Copy link
Member

@laipz8200 laipz8200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 7, 2024
@laipz8200 laipz8200 merged commit 610da4f into langgenius:main Jul 7, 2024
5 checks passed
ZhouhaoJiang added a commit that referenced this pull request Jul 9, 2024
* refs/heads/main: (51 commits)
  feat: tailwind related improvement (#6085)
  feat: support AnalyticDB vector store (#5586)
  feat:add tts-streaming config and future (#5492)
  Feat: add index bar to select tool panel of workflow (#6066)
  bump to 0.6.13 (#6078)
  fix: Inconsistency Between Actual and Debug Input Variables (#6055)
  refactor: revamp picker block (#4227)
  chore: remove tsne unused code (#6077)
  fix: relative in overflow div (#5998)
  chore(action): move docker login above Set up QEMU in build-push action workflow (#6073)
  remove clunky welcome message (#6069)
  feat: add request_params field to jina_reader tool (#5610)
  fix azure stream download (#6063)
  chore: hide tracing introduce detail (#6049)
  Address the issue of the absence of poetry in the development container. (#6036)
  Fix authorization header validation to handle bearer types correctly - "authorization config header is required" error (#6040)
  Fix/6034 get random order of categories in explore and workflow is missing in zh hant (#6043)
  Modify slack webhook url validation to allow workflow (#6041) (#6042)
  fix(configs): Update pydantic settings in config files (#6023)
  Fix/incorrect parameter extractor memory (#6038)
  ...
laipz8200 pushed a commit that referenced this pull request Jul 10, 2024
…- "authorization config header is required" error (#6040)
@75py 75py deleted the fix-authorization-config-header-issue-6033 branch July 14, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error message:authorization config header is required
2 participants