这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow custom headers in upload-link endpoint #3695

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

Merged

Conversation

shatfield4
Copy link
Collaborator

Pull Request Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #3626

What is in this change?

  • Allows users calling on the /v1/document/upload-link endpoint to set (optional) custom headers that are passed to the puppeteer web scraper
  • Ensured it does not break any existing functionality in developer API or main application

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@shatfield4 shatfield4 linked an issue Apr 22, 2025 that may be closed by this pull request
@timothycarambat timothycarambat added the PR:needs review Needs review by core team label Apr 22, 2025
shatfield4 and others added 4 commits April 22, 2025 10:45
move positional args to named args
update documentation to reflect arg changes and funciton sigs
validate header object before attempting to end to forward to request
@shatfield4 shatfield4 merged commit 610bdd4 into master Apr 22, 2025
@shatfield4 shatfield4 deleted the 3626-feat-allow-custom-headers-for-the-upload-link-endpoint branch April 22, 2025 19:47
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
* allow custom headers in upload-link endpoint

* override loader.scrape to allow for passing of headers in langchain puppeteer

* lint

* Rename some variables
move positional args to named args
update documentation to reflect arg changes and funciton sigs
validate header object before attempting to end to forward to request

* update header validation for custom headers

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:needs review Needs review by core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Allow custom headers for the upload-link endpoint
2 participants