forked from p15670423/monkey
Island: Authenticate `api/island/version`
This commit is contained in:
parent
4500d57edd
commit
bfd0eb6fa5
|
@ -2,6 +2,7 @@ import logging
|
|||
|
||||
from monkey_island.cc import Version
|
||||
from monkey_island.cc.resources.AbstractResource import AbstractResource
|
||||
from monkey_island.cc.resources.request_authentication import jwt_required
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -12,8 +13,7 @@ class Version(AbstractResource):
|
|||
def __init__(self, version: Version):
|
||||
self._version = version
|
||||
|
||||
# We don't secure this since it doesn't give out any private info and we want UI to know version
|
||||
# even when not authenticated
|
||||
@jwt_required
|
||||
def get(self):
|
||||
return {
|
||||
"version_number": self._version.version_number,
|
||||
|
|
Loading…
Reference in New Issue