From ceabd8ddd0019ef7f4aff2374d514f508204425a Mon Sep 17 00:00:00 2001 From: daniel goldberg Date: Mon, 22 Aug 2016 19:29:44 +0300 Subject: [PATCH] Added default redirect to Monkey Island --- monkey_island/cc/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/monkey_island/cc/main.py b/monkey_island/cc/main.py index 2595396af..a22d598ec 100644 --- a/monkey_island/cc/main.py +++ b/monkey_island/cc/main.py @@ -5,7 +5,7 @@ import sys import array import struct from shutil import copyfile -from flask import Flask, request, abort, send_from_directory +from flask import Flask, request, abort, send_from_directory, redirect from flask.ext import restful from flask.ext.pymongo import PyMongo from flask import make_response @@ -387,6 +387,11 @@ def send_admin(path): return send_from_directory('admin/ui', path) +@app.route("/") +def send_to_default(): + return redirect('/admin/index.html') + + DEFAULT_REPRESENTATIONS = {'application/json': output_json} api = restful.Api(app) api.representations = DEFAULT_REPRESENTATIONS