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!
This commit is contained in:
Mike P. Sinn
2024-01-06 01:50:57 -06:00
committed by GitHub
parent 49415e4615
commit a29c1ff05c
6 changed files with 7 additions and 6 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
.DS_store
.venv
.mypy_cache
.idea

View File

@@ -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"
#####

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.