mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: OpenAPI authentication (#4110)
This commit is contained in:
parent
3e8bf8a631
commit
801891de82
|
|
@ -115,7 +115,8 @@ content = """
|
|||
|
||||
class DocHeadersMiddleware(MiddlewareMixin):
|
||||
def process_response(self, request, response):
|
||||
if request.path.startswith('/doc/') or request.path.startswith('/doc_chat/'):
|
||||
if request.path.startswith(CONFIG.get_admin_path() + '/api-doc/') or request.path.startswith(
|
||||
CONFIG.get_chat_path() + '/api-doc/'):
|
||||
auth = request.COOKIES.get('Authorization')
|
||||
if auth is None:
|
||||
return HttpResponse(content)
|
||||
|
|
|
|||
Loading…
Reference in New Issue