only display warning if not started as wsgi
This commit is contained in:
@@ -30,9 +30,10 @@ Take a look at the class ``BaseAuth`` if you want to implement your own.
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
from typing import Sequence, Set, Tuple, Union, final
|
||||
from typing import List, Sequence, Set, Tuple, Union, final
|
||||
|
||||
from radicale import config, types, utils
|
||||
from radicale.log import logger
|
||||
@@ -71,6 +72,8 @@ def load(configuration: "config.Configuration") -> "BaseAuth":
|
||||
elif _type == "denyall":
|
||||
logger.warning("All user authentication is blocked by: '[auth] type=denyall'")
|
||||
elif _type in INSECURE_IF_NO_LOOPBACK_TYPES:
|
||||
sgi = os.environ.get('SERVER_GATEWAY_INTERFACE') or None
|
||||
if not sgi:
|
||||
hosts: List[Tuple[str, int]] = configuration.get("server", "hosts")
|
||||
localhost_only = True
|
||||
address_lo = []
|
||||
|
||||
Reference in New Issue
Block a user