refactor: 修改 API 文档权限为仅允许认证用户访问
- 将 API 文档的权限设置从 AllowAny 更改为 IsAuthenticated- 确保只有经过身份验证的用户才能访问 API 文档
This commit is contained in:
@@ -50,7 +50,7 @@ schema_view = get_schema_view(
|
|||||||
license=openapi.License(name="BSD License"),
|
license=openapi.License(name="BSD License"),
|
||||||
),
|
),
|
||||||
public=True,
|
public=True,
|
||||||
permission_classes=(permissions.AllowAny,),
|
permission_classes=(permissions.IsAuthenticated,),
|
||||||
generator_class=CustomOpenAPISchemaGenerator,
|
generator_class=CustomOpenAPISchemaGenerator,
|
||||||
)
|
)
|
||||||
# 前端页面映射
|
# 前端页面映射
|
||||||
|
|||||||
Reference in New Issue
Block a user