1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 19:05:16 +00:00

SEAFILE_SERVER_PROTOCOL (#6734)

This commit is contained in:
欢乐马 2024-09-09 12:09:28 +08:00 committed by GitHub
parent 6e5c50c4bf
commit 63e1802bcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1037,8 +1037,8 @@ class SeahubConfigurator(AbstractConfigurator):
def get_proto(self):
is_https = os.environ.get('SEAFILE_SERVER_LETSENCRYPT', 'false').lower() == 'true'
proto = 'https' if is_https else 'http'
force_https_in_conf = os.environ.get('FORCE_HTTPS_IN_CONF', 'false').lower() == 'true'
if force_https_in_conf:
seafile_server_proto = os.environ.get('SEAFILE_SERVER_PROTOCOL', 'http')
if seafile_server_proto == 'https':
proto = 'https'
return proto