From f7fb36a176afaf2d5e8b5a7e1d800b2471ae2b81 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 27 Jul 2018 15:21:14 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 15db793d9..f31f8cbae 100644 --- a/apps/jumpserver/urls.py +++ b/apps/jumpserver/urls.py @@ -43,7 +43,7 @@ class HttpResponseTemporaryRedirect(HttpResponse): @csrf_exempt -def redirect_new_format_api(request, *args, **kwargs): +def redirect_format_api(request, *args, **kwargs): path, query = request.path, request.GET.urlencode() matched = api_url_pattern.match(path) if matched: @@ -84,7 +84,7 @@ urlpatterns = [ url(r'^luna/', LunaView.as_view(), name='luna-error'), url(r'^settings/', include('common.urls.view_urls', namespace='settings')), url(r'^common/', include('common.urls.view_urls', namespace='common')), - url(r'^api/v1/.*', redirect_new_format_api), + url(r'^api/v1/.*', redirect_format_api), url(r'^api/', include(v1_api_patterns)), # Api url view map