forked from LBRYCommunity/lbry-sdk
move USE_AUTH_HTTP to adjustable settings
This commit is contained in:
parent
22fc26797d
commit
293933163f
3 changed files with 4 additions and 4 deletions
|
@ -65,13 +65,13 @@ ADJUSTABLE_SETTINGS = {
|
|||
'DEFAULT_UI_BRANCH': 'master',
|
||||
'DATA_DIR': default_data_dir,
|
||||
'LBRYUM_WALLET_DIR': default_lbryum_dir,
|
||||
'USE_AUTH_HTTP': False,
|
||||
'sd_download_timeout': 3,
|
||||
'max_key_fee': {'USD': {'amount': 25.0, 'address': ''}}
|
||||
}
|
||||
|
||||
|
||||
class ApplicationSettings(object):
|
||||
USE_AUTH_HTTP = True
|
||||
MAX_HANDSHAKE_SIZE = 2**16
|
||||
MAX_REQUEST_SIZE = 2**16
|
||||
MAX_BLOB_REQUEST_SIZE = 2**16
|
||||
|
|
|
@ -92,7 +92,7 @@ def start():
|
|||
action='store_true',
|
||||
help='enable more debug output for the console')
|
||||
|
||||
parser.set_defaults(branch=False, launchui=True, logtoconsole=False, quiet=False, useauth=False)
|
||||
parser.set_defaults(branch=False, launchui=True, logtoconsole=False, quiet=False, useauth=settings.USE_AUTH_HTTP)
|
||||
args = parser.parse_args()
|
||||
|
||||
log_support.configure_file_handler(lbrynet_log)
|
||||
|
@ -143,7 +143,7 @@ def start():
|
|||
if args.launchui:
|
||||
d.addCallback(lambda _: webbrowser.open(settings.UI_ADDRESS))
|
||||
|
||||
if args.useauth:
|
||||
if settings.USE_AUTH_HTTP:
|
||||
log.info("Using authenticated API")
|
||||
pw_path = os.path.join(settings.DATA_DIR, ".api_keys")
|
||||
initialize_api_key_file(pw_path)
|
||||
|
|
|
@ -81,7 +81,7 @@ class AuthJSONRPCServer(AuthorizedBase):
|
|||
NOT_FOUND = 8001
|
||||
FAILURE = 8002
|
||||
|
||||
def __init__(self, use_authentication=True):
|
||||
def __init__(self, use_authentication=settings.USE_AUTH_HTTP):
|
||||
AuthorizedBase.__init__(self)
|
||||
self._use_authentication = use_authentication
|
||||
self.allowed_during_startup = []
|
||||
|
|
Loading…
Reference in a new issue