wFix: Change default fetch URL to local backend in chat component#5
Open
cavit99 wants to merge 1 commit intowinfunc:mainfrom
Open
wFix: Change default fetch URL to local backend in chat component#5cavit99 wants to merge 1 commit intowinfunc:mainfrom
cavit99 wants to merge 1 commit intowinfunc:mainfrom
Conversation
This commit updates the default `fetch` URL in `frontend/components/chat.tsx` from `https://api.deepclaude.com` to `http://127.0.0.1:1337`. **Reasoning:** The previous default configuration unintentionally directed API requests to the hosted `api.deepclaude.com` endpoint, even when users were running the frontend locally. This could lead to users inadvertently sending their API keys to the external server if they used the chat interface without realizing this default setting. This change ensures that by default, the frontend communicates with the local backend server running on `http://127.0.0.1:1337`, aligning with the expected behavior for users who are self-hosting the application. **Security Improvement:** By pointing to the local backend by default, this commit reduces the risk of users unintentionally exposing their API keys to an external server. Users who intend to use the managed `api.deepclaude.com` API can still manually change the fetch URL, but the default is now correctly configured for local development and self-hosting scenarios.
|
Hello, when I changed the code like you did, I encountered the following problem. Have you encountered it before? How was it resolved? @cavit99 I change code like this:
I run frontend like this: Then, meet this problem: like this: vercel/next.js#49896 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit updates the default
fetchURL infrontend/components/chat.tsxfromhttps://api.deepclaude.comtohttp://127.0.0.1:1337.Reasoning:
The previous default configuration unintentionally directed API requests to the hosted
api.deepclaude.comendpoint, even when users were running the frontend locally. This could lead to users inadvertently sending their API keys to the external server if they used the chat interface without realizing this default setting.This change ensures that by default, the frontend communicates with the local backend server running on
http://127.0.0.1:1337, aligning with the expected behavior for users who are self-hosting the application.Security Improvement:
By pointing to the local backend by default, this commit reduces the risk of users unintentionally exposing their API keys to an external server.
Users who intend to use the managed
api.deepclaude.comAPI can still manually change the fetch URL, but the default is now correctly configured for local development and self-hosting scenarios.