mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
parent
3cd7b29611
commit
ef2bcdcd17
|
|
@ -20,3 +20,10 @@ class CustomSwaggerAutoSchema(SwaggerAutoSchema):
|
||||||
if "api" in tags and operation_keys:
|
if "api" in tags and operation_keys:
|
||||||
return [tags_dict.get(operation_keys[1]) if operation_keys[1] in tags_dict else operation_keys[1]]
|
return [tags_dict.get(operation_keys[1]) if operation_keys[1] in tags_dict else operation_keys[1]]
|
||||||
return tags
|
return tags
|
||||||
|
def get_schema(self, request=None, public=False):
|
||||||
|
schema = super().get_schema(request, public)
|
||||||
|
if request.is_secure():
|
||||||
|
schema.schemes = ['https']
|
||||||
|
else:
|
||||||
|
schema.schemes = ['http']
|
||||||
|
return schema
|
||||||
|
|
@ -26,6 +26,8 @@ DATABASES = {
|
||||||
'default': CONFIG.get_db_setting()
|
'default': CONFIG.get_db_setting()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue