Commit d54c6d26 by Bach Dániel

dashboard: remove hardcoded proxy key

parent 9aba69a4
...@@ -8,6 +8,7 @@ from vm.models import Instance, InstanceTemplate, InterfaceTemplate ...@@ -8,6 +8,7 @@ from vm.models import Instance, InstanceTemplate, InterfaceTemplate
from firewall.models import Vlan from firewall.models import Vlan
from storage.models import Disk from storage.models import Disk
from django.core import signing from django.core import signing
from os import getenv
import json import json
...@@ -48,7 +49,8 @@ class VmDetailView(DetailView): ...@@ -48,7 +49,8 @@ class VmDetailView(DetailView):
port = instance.vnc_port port = instance.vnc_port
host = str(instance.node.host.ipv4) host = str(instance.node.host.ipv4)
value = signing.dumps({'host': host, value = signing.dumps({'host': host,
'port': port}, key='asdasd') 'port': port},
key=getenv("PROXY_SECRET", 'asdasd')),
context.update({ context.update({
'vnc_url': '%s' % value 'vnc_url': '%s' % value
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment