From 15fe7f810bbc3c1cce660b525056216407ba8a13 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:09:23 +0800 Subject: [PATCH] =?UTF-8?q?perf(url):=20=E4=BC=98=E5=8C=96=20/api/docs/=3F?= =?UTF-8?q?=20=E9=83=BD=E5=8F=AF=E4=BB=A5=E8=AE=BF=E9=97=AE=E6=96=87?= =?UTF-8?q?=E6=A1=A3=20(#4446)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ibuler --- apps/jumpserver/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/jumpserver/urls.py b/apps/jumpserver/urls.py index 60c04676f..d39eb56c5 100644 --- a/apps/jumpserver/urls.py +++ b/apps/jumpserver/urls.py @@ -75,8 +75,8 @@ if settings.DEBUG: urlpatterns += [ re_path('^api/swagger(?P\.json|\.yaml)$', views.get_swagger_view().without_ui(cache_timeout=1), name='schema-json'), - path('api/docs/', views.get_swagger_view().with_ui('swagger', cache_timeout=1), name="docs"), - path('api/redoc/', views.get_swagger_view().with_ui('redoc', cache_timeout=1), name='redoc'), + re_path('api/docs/?', views.get_swagger_view().with_ui('swagger', cache_timeout=1), name="docs"), + re_path('api/redoc/?', views.get_swagger_view().with_ui('redoc', cache_timeout=1), name='redoc'), re_path('^api/v2/swagger(?P\.json|\.yaml)$', views.get_swagger_view().without_ui(cache_timeout=1), name='schema-json'),