mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-25 22:42:05 +00:00
fix(task): 修复推送过期的问题
fix(rdp): 修复下载rdp文件失败的问题
This commit is contained in:
parent
3d6aa15ece
commit
7b679f3e82
@ -140,13 +140,13 @@ class UserConnectionTokenViewSet(RootOrgViewMixin, SerializerMixin2, GenericView
|
||||
# Todo: 上线后地址是 JumpServerAddr:3389
|
||||
address = self.request.query_params.get('address') or '1.1.1.1'
|
||||
options['full address:s'] = address
|
||||
options['username:s'] = '{}@{}'.format(user.username, token)
|
||||
options['username:s'] = '{}|{}'.format(user.username, token)
|
||||
options['desktopwidth:i'] = width
|
||||
options['desktopheight:i'] = height
|
||||
data = ''
|
||||
for k, v in options.items():
|
||||
data += f'{k}:{v}\n'
|
||||
response = HttpResponse(data, content_type='text/plain')
|
||||
response = HttpResponse(data, content_type='application/octet-stream')
|
||||
filename = "{}-{}-jumpserver.rdp".format(user.username, asset.hostname)
|
||||
response['Content-Disposition'] = 'attachment; filename={}'.format(filename)
|
||||
return response
|
||||
|
Loading…
Reference in New Issue
Block a user