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

Conversation

@timothycarambat
Copy link
Member

@timothycarambat timothycarambat commented Dec 11, 2023

connect #417

Passthrough API key for all LocalAI API calls when defined by the user either in embedder or LLM setup

@review-agent-prime
Copy link

frontend/src/components/EmbeddingSelection/LocalAiOptions/index.jsx

Consider storing the API key in a secure place like cookies with httpOnly flag set to true or in the server-side session. This way, the key will not be accessible through JavaScript and will be automatically sent with each request to the server.
Create Issue
See the diff
Checkout the fix

    // Example of storing API key in a secure cookie
    document.cookie = "apiKey=" + apiKeyValue + "; Secure; HttpOnly";
git fetch origin && git checkout -b ReviewBot/The-c-h22dh5w origin/ReviewBot/The-c-h22dh5w

@timothycarambat timothycarambat merged commit cba6615 into master Dec 11, 2023
@timothycarambat timothycarambat deleted the patch-local-ai-api branch December 11, 2023 22:18
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants