Skip to content

Commit c0d5d6f

Browse files
committed
fix: OpenAPI authentication
1 parent 7baedb9 commit c0d5d6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/common/middleware/doc_headers_middleware.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115

116116
class DocHeadersMiddleware(MiddlewareMixin):
117117
def process_response(self, request, response):
118-
if request.path.startswith('/doc/') or request.path.startswith('/doc_chat/'):
118+
if request.path.startswith(CONFIG.get_admin_path() + '/api-doc/') or request.path.startswith(
119+
CONFIG.get_chat_path() + '/api-doc/'):
119120
auth = request.COOKIES.get('Authorization')
120121
if auth is None:
121122
return HttpResponse(content)

0 commit comments

Comments
 (0)