Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
1c2aa107
Commit
1c2aa107
authored
May 08, 2024
by
Timothy J. Baek
Browse files
refac: disable enable_signup if webui_auth false
parent
bcd5853c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
backend/config.py
backend/config.py
+22
-16
No files found.
backend/config.py
View file @
1c2aa107
...
@@ -154,6 +154,23 @@ for version in soup.find_all("h2"):
...
@@ -154,6 +154,23 @@ for version in soup.find_all("h2"):
CHANGELOG
=
changelog_json
CHANGELOG
=
changelog_json
####################################
# WEBUI_VERSION
####################################
WEBUI_VERSION
=
os
.
environ
.
get
(
"WEBUI_VERSION"
,
"v1.0.0-alpha.100"
)
####################################
# WEBUI_AUTH (Required for security)
####################################
WEBUI_AUTH
=
os
.
environ
.
get
(
"WEBUI_AUTH"
,
"True"
).
lower
()
==
"true"
WEBUI_AUTH_TRUSTED_EMAIL_HEADER
=
os
.
environ
.
get
(
"WEBUI_AUTH_TRUSTED_EMAIL_HEADER"
,
None
)
####################################
####################################
# DATA/FRONTEND BUILD DIR
# DATA/FRONTEND BUILD DIR
####################################
####################################
...
@@ -346,7 +363,11 @@ OPENAI_API_BASE_URL = "https://api.openai.com/v1"
...
@@ -346,7 +363,11 @@ OPENAI_API_BASE_URL = "https://api.openai.com/v1"
# WEBUI
# WEBUI
####################################
####################################
ENABLE_SIGNUP
=
os
.
environ
.
get
(
"ENABLE_SIGNUP"
,
"True"
).
lower
()
==
"true"
ENABLE_SIGNUP
=
(
False
if
WEBUI_AUTH
==
False
else
os
.
environ
.
get
(
"ENABLE_SIGNUP"
,
"True"
).
lower
()
==
"true"
)
DEFAULT_MODELS
=
os
.
environ
.
get
(
"DEFAULT_MODELS"
,
None
)
DEFAULT_MODELS
=
os
.
environ
.
get
(
"DEFAULT_MODELS"
,
None
)
...
@@ -403,21 +424,6 @@ WEBHOOK_URL = os.environ.get("WEBHOOK_URL", "")
...
@@ -403,21 +424,6 @@ WEBHOOK_URL = os.environ.get("WEBHOOK_URL", "")
ENABLE_ADMIN_EXPORT
=
os
.
environ
.
get
(
"ENABLE_ADMIN_EXPORT"
,
"True"
).
lower
()
==
"true"
ENABLE_ADMIN_EXPORT
=
os
.
environ
.
get
(
"ENABLE_ADMIN_EXPORT"
,
"True"
).
lower
()
==
"true"
####################################
# WEBUI_VERSION
####################################
WEBUI_VERSION
=
os
.
environ
.
get
(
"WEBUI_VERSION"
,
"v1.0.0-alpha.100"
)
####################################
# WEBUI_AUTH (Required for security)
####################################
WEBUI_AUTH
=
os
.
environ
.
get
(
"WEBUI_AUTH"
,
"True"
).
lower
()
==
"true"
WEBUI_AUTH_TRUSTED_EMAIL_HEADER
=
os
.
environ
.
get
(
"WEBUI_AUTH_TRUSTED_EMAIL_HEADER"
,
None
)
####################################
####################################
# WEBUI_SECRET_KEY
# WEBUI_SECRET_KEY
####################################
####################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment