mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-30 03:42:54 +00:00
Merge pull request #1369 from gengkeye/master
录像回放API BUG: SessionReplayViewSet
This commit is contained in:
commit
4f521e5a94
@ -4,6 +4,7 @@ from collections import OrderedDict
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import uuid
|
import uuid
|
||||||
|
import copy
|
||||||
|
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.shortcuts import get_object_or_404, redirect
|
from django.shortcuts import get_object_or_404, redirect
|
||||||
@ -291,8 +292,12 @@ class SessionReplayViewSet(viewsets.ViewSet):
|
|||||||
url = default_storage.url(path)
|
url = default_storage.url(path)
|
||||||
return redirect(url)
|
return redirect(url)
|
||||||
else:
|
else:
|
||||||
configs = settings.TERMINAL_REPLAY_STORAGE
|
config = settings.TERMINAL_REPLAY_STORAGE
|
||||||
configs = [cfg for cfg in configs if cfg['TYPE'] != 'server']
|
configs = copy.deepcopy(config)
|
||||||
|
for cfg in config:
|
||||||
|
if config[cfg]['TYPE'] == 'server':
|
||||||
|
configs.__delitem__(cfg)
|
||||||
|
|
||||||
if not configs:
|
if not configs:
|
||||||
return HttpResponseNotFound()
|
return HttpResponseNotFound()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user