mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 10:15:27 -04:00
Warn when localhost auth bypass is enabled
This commit is contained in:
@@ -134,6 +134,8 @@ auth_manager = AuthManager()
|
|||||||
app.state.auth_manager = auth_manager
|
app.state.auth_manager = auth_manager
|
||||||
AUTH_ENABLED = os.getenv("AUTH_ENABLED", "true").lower() != "false"
|
AUTH_ENABLED = os.getenv("AUTH_ENABLED", "true").lower() != "false"
|
||||||
LOCALHOST_BYPASS = os.getenv("LOCALHOST_BYPASS", "false").lower() == "true"
|
LOCALHOST_BYPASS = os.getenv("LOCALHOST_BYPASS", "false").lower() == "true"
|
||||||
|
if LOCALHOST_BYPASS:
|
||||||
|
logger.warning("LOCALHOST_BYPASS is enabled, loopback requests bypass authentication. Do not expose this instance to a network.")
|
||||||
|
|
||||||
if AUTH_ENABLED:
|
if AUTH_ENABLED:
|
||||||
AUTH_EXEMPT_EXACT = {
|
AUTH_EXEMPT_EXACT = {
|
||||||
|
|||||||
Reference in New Issue
Block a user