Change-Id: I01b2a4836ab66ff5cdca72d1a0637d83e0a5b9fb
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
# logs
# ENV OSMNBI_LOG_FILE /app/log/nbi.log
ENV OSMNBI_LOG_LEVEL DEBUG
+# ENV OSMNBI_SERVER_ENABLE_TEST False
+
# message
ENV OSMNBI_MESSAGE_DRIVER kafka
ENV OSMNBI_MESSAGE_HOST kafka
# Uncomment for allow basic authentication apart from bearer
# auth.allow_basic_authentication: True
+# comment or set to False to disable /test URL
+server.enable_test: True
+
log.screen: False
log.access_file: ""
log.error_file: ""
@cherrypy.expose
def test(self, *args, **kwargs):
+ if not cherrypy.config.get("server.enable_test") or (isinstance(cherrypy.config["server.enable_test"], str) and
+ cherrypy.config["server.enable_test"].lower() == "false"):
+ cherrypy.response.status = HTTPStatus.METHOD_NOT_ALLOWED.value
+ return "test URL is disabled"
thread_info = None
if args and args[0] == "help":
return "<html><pre>\ninit\nfile/<name> download file\ndb-clear/table\nfs-clear[/folder]\nlogin\nlogin2\n"\