mirror of https://github.com/jumpserver/jumpserver
[Update] 修改api
parent
0d7295b60e
commit
f7fb36a176
|
@ -43,7 +43,7 @@ class HttpResponseTemporaryRedirect(HttpResponse):
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
def redirect_new_format_api(request, *args, **kwargs):
|
def redirect_format_api(request, *args, **kwargs):
|
||||||
path, query = request.path, request.GET.urlencode()
|
path, query = request.path, request.GET.urlencode()
|
||||||
matched = api_url_pattern.match(path)
|
matched = api_url_pattern.match(path)
|
||||||
if matched:
|
if matched:
|
||||||
|
@ -84,7 +84,7 @@ urlpatterns = [
|
||||||
url(r'^luna/', LunaView.as_view(), name='luna-error'),
|
url(r'^luna/', LunaView.as_view(), name='luna-error'),
|
||||||
url(r'^settings/', include('common.urls.view_urls', namespace='settings')),
|
url(r'^settings/', include('common.urls.view_urls', namespace='settings')),
|
||||||
url(r'^common/', include('common.urls.view_urls', namespace='common')),
|
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)),
|
url(r'^api/', include(v1_api_patterns)),
|
||||||
|
|
||||||
# Api url view map
|
# Api url view map
|
||||||
|
|
Loading…
Reference in New Issue