fix: replace instances of 127.0.0.1 to localhost (#8536)

* Replace instances of 127.0.0.1 to localhost

* fix some replace-all issues

* fix some replace-all issues

* update starterprojects

* Upgrade uvlock
This commit is contained in:
Jordan Frazier 2025-06-16 08:54:04 -07:00 committed by GitHub
commit b77351331d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 3959 additions and 5686 deletions

View file

@ -266,7 +266,7 @@ def wait_for_server_ready(host, port, protocol) -> None:
while status_code != httpx.codes.OK:
try:
status_code = httpx.get(
f"{protocol}://{host}:{port}/health", verify=host not in ("127.0.0.1", "localhost")
f"{protocol}://{host}:{port}/health", verify=host not in ("localhost", "127.0.0.1")
).status_code
except HTTPError:
time.sleep(1)

View file

@ -390,7 +390,7 @@ if __name__ == "__main__":
configure()
uvicorn.run(
"langflow.main:create_app",
host="127.0.0.1",
host="localhost",
port=7860,
workers=get_number_of_workers(),
log_level="error",

View file

@ -189,7 +189,7 @@ class Settings(BaseSettings):
"""If set to True, Langflow will keep track of each vertex builds (outputs) in the UI for any flow."""
# Config
host: str = "127.0.0.1"
host: str = "localhost"
"""The host on which Langflow will run."""
port: int = 7860
"""The port on which Langflow will run."""

View file

@ -15,9 +15,9 @@ from langflow.utils import util_strings
("mysql://user:pass@localhost/dbname", True),
("mysql+mysqldb://scott:tiger@localhost/foo", True),
("mysql+pymysql://scott:tiger@localhost/foo", True),
("oracle://scott:tiger@127.0.0.1:1521/?service_name=freepdb1", True),
("oracle://scott:tiger@localhost:1521/?service_name=freepdb1", True),
("oracle+cx_oracle://scott:tiger@tnsalias", True),
("oracle+oracledb://scott:tiger@127.0.0.1:1521/?service_name=freepdb1", True),
("oracle+oracledb://scott:tiger@localhost:1521/?service_name=freepdb1", True),
("", False),
(" invalid ", False),
("not_a_url", False),

View file

@ -116,7 +116,7 @@
"last 1 safari version"
]
},
"proxy": "http://127.0.0.1:7860",
"proxy": "http://localhost:7860",
"devDependencies": {
"@playwright/test": "^1.52.0",
"@swc/cli": "^0.5.2",

View file

@ -103,7 +103,7 @@ export default defineConfig({
webServer: [
{
command:
"uv run uvicorn --factory langflow.main:create_app --host 127.0.0.1 --port 7860 --loop asyncio",
"uv run uvicorn --factory langflow.main:create_app --host localhost --port 7860 --loop asyncio",
port: 7860,
env: {
LANGFLOW_DATABASE_URL: "sqlite:///./temp",
@ -118,7 +118,7 @@ export default defineConfig({
command: "npm start",
port: PORT || 3000,
env: {
VITE_PROXY_TARGET: "http://127.0.0.1:7860",
VITE_PROXY_TARGET: "http://localhost:7860",
},
},
],

View file

@ -1,6 +1,6 @@
export const BASENAME = "";
export const PORT = 3000;
export const PROXY_TARGET = "http://127.0.0.1:7860";
export const PROXY_TARGET = "http://localhost:7860";
export const API_ROUTES = ["^/api/v1/", "^/api/v2/", "/health"];
export const BASE_URL_API = "/api/v1/";
export const BASE_URL_API_V2 = "/api/v2/";

View file

@ -23,7 +23,7 @@ export default defineConfig(({ mode }) => {
const apiRoutes = API_ROUTES || ["^/api/v1/", "^/api/v2/", "/health"];
const target =
env.VITE_PROXY_TARGET || PROXY_TARGET || "http://127.0.0.1:7860";
env.VITE_PROXY_TARGET || PROXY_TARGET || "http://localhost:7860";
const port = Number(env.VITE_PORT) || PORT || 3000;
@ -44,7 +44,7 @@ export default defineConfig(({ mode }) => {
},
define: {
"process.env.BACKEND_URL": JSON.stringify(
envLangflow.BACKEND_URL ?? "http://127.0.0.1:7860",
envLangflow.BACKEND_URL ?? "http://localhost:7860",
),
"process.env.ACCESS_TOKEN_EXPIRE_SECONDS": JSON.stringify(
envLangflow.ACCESS_TOKEN_EXPIRE_SECONDS ?? 60,