From a29c1ff05cb4026f27a9ab9b7e979d66e13b6faf Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" <2808553+mikepsinn@users.noreply.github.com> Date: Sat, 6 Jan 2024 01:50:57 -0600 Subject: [PATCH] Change WEB_DOMAIN default to 127.0.0.1 instead of localhost (#901) Got it, thanks for the contribution! Neither of us (maintainers) use Windows so we weren't aware of this. Thanks a bunch for pointing it out and fixing it! --- .gitignore | 1 + backend/danswer/configs/app_configs.py | 2 +- deployment/docker_compose/docker-compose.dev.yml | 4 ++-- deployment/docker_compose/env.prod.template | 2 +- deployment/kubernetes/env-configmap.yaml | 2 +- web/README.md | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ebda0a7c83a6..850775a4138b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .DS_store .venv .mypy_cache +.idea diff --git a/backend/danswer/configs/app_configs.py b/backend/danswer/configs/app_configs.py index ca39b84cf683..7ed6ac9551ad 100644 --- a/backend/danswer/configs/app_configs.py +++ b/backend/danswer/configs/app_configs.py @@ -27,7 +27,7 @@ DISABLE_GENERATIVE_AI = os.environ.get("DISABLE_GENERATIVE_AI", "").lower() == " # Web Configs ##### # WEB_DOMAIN is used to set the redirect_uri after login flows -WEB_DOMAIN = os.environ.get("WEB_DOMAIN") or "http://localhost:3000" +WEB_DOMAIN = os.environ.get("WEB_DOMAIN") or "http://127.0.0.1:3000" ##### diff --git a/deployment/docker_compose/docker-compose.dev.yml b/deployment/docker_compose/docker-compose.dev.yml index 94d59132871e..6cef38ae9906 100644 --- a/deployment/docker_compose/docker-compose.dev.yml +++ b/deployment/docker_compose/docker-compose.dev.yml @@ -18,13 +18,13 @@ services: environment: # Auth Settings - AUTH_TYPE=${AUTH_TYPE:-disabled} - - SESSION_EXPIRE_TIME_SECONDS=${SESSION_EXPIRE_TIME_SECONDS:-} + - SESSION_EXPIRE_TIME_SECONDS=${SESSION_EXPIRE_TIME_SECONDS:-86400} - VALID_EMAIL_DOMAINS=${VALID_EMAIL_DOMAINS:-} - GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID:-} - GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET:-} - REQUIRE_EMAIL_VERIFICATION=${REQUIRE_EMAIL_VERIFICATION:-} - SMTP_SERVER=${SMTP_SERVER:-} # For sending verification emails, if unspecified then defaults to 'smtp.gmail.com' - - SMTP_PORT=${SMTP_PORT:-} # For sending verification emails, if unspecified then defaults to '587' + - SMTP_PORT=${SMTP_PORT:-587} # For sending verification emails, if unspecified then defaults to '587' - SMTP_USER=${SMTP_USER:-} - SMTP_PASS=${SMTP_PASS:-} # Gen AI Settings diff --git a/deployment/docker_compose/env.prod.template b/deployment/docker_compose/env.prod.template index 190630f6cbe1..25ae40afd5f9 100644 --- a/deployment/docker_compose/env.prod.template +++ b/deployment/docker_compose/env.prod.template @@ -4,7 +4,7 @@ # Could be something like danswer.companyname.com -WEB_DOMAIN=http://localhost:3000 +WEB_DOMAIN=http://127.0.0.1:3000 # Generative AI settings, uncomment as needed, will work with defaults diff --git a/deployment/kubernetes/env-configmap.yaml b/deployment/kubernetes/env-configmap.yaml index a296fed30651..1ab8ebe16fab 100644 --- a/deployment/kubernetes/env-configmap.yaml +++ b/deployment/kubernetes/env-configmap.yaml @@ -69,5 +69,5 @@ data: LOG_VESPA_TIMING_INFORMATION: "" # Shared or Non-backend Related INTERNAL_URL: "http://api-server-service:80" # for web server - WEB_DOMAIN: "http://localhost:3000" # for web server and api server + WEB_DOMAIN: "http://127.0.0.1:3000" # for web server and api server DOMAIN: "localhost" # for nginx diff --git a/web/README.md b/web/README.md index be2932bdc977..af76266d1030 100644 --- a/web/README.md +++ b/web/README.md @@ -17,4 +17,4 @@ yarn dev pnpm dev ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +Open [http://127.0.0.1:3000](http://127.0.0.1:3000) with your browser to see the result.