diff --git a/web/__init__.py b/web/__init__.py index c4fb9bf..5d66611 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -48,19 +48,19 @@ def create_app(test_config=None): system.init_app(app) from . import config - app.register_blueprint(config.blueprint) + app.register_blueprint(config.blueprint, url_prefix='/config') from . import ipsets - app.register_blueprint(ipsets.blueprint) + app.register_blueprint(ipsets.blueprint, url_prefix='/ipsets') from . import nat - app.register_blueprint(nat.blueprint) + app.register_blueprint(nat.blueprint, url_prefix='/nat') from . import rules - app.register_blueprint(rules.blueprint) + app.register_blueprint(rules.blueprint, url_prefix='/rules') from . import vpn - app.register_blueprint(vpn.blueprint) + app.register_blueprint(vpn.blueprint, url_prefix='/vpn') @app.route('/') @flask_login.login_required diff --git a/web/config.py b/web/config.py index d0be979..44e11f7 100644 --- a/web/config.py +++ b/web/config.py @@ -6,7 +6,7 @@ import flask_login from . import db from . import system -blueprint = flask.Blueprint('config', __name__, url_prefix='/config') +blueprint = flask.Blueprint('config', __name__) @blueprint.route('/', methods=('GET', 'POST')) @flask_login.login_required diff --git a/web/ipsets.py b/web/ipsets.py index 42935a3..63f8c04 100644 --- a/web/ipsets.py +++ b/web/ipsets.py @@ -6,7 +6,7 @@ import flask_login from . import db from . import system -blueprint = flask.Blueprint('ipsets', __name__, url_prefix='/ipsets') +blueprint = flask.Blueprint('ipsets', __name__) @blueprint.route('/', methods=('GET', 'POST')) @flask_login.login_required diff --git a/web/nat.py b/web/nat.py index 98d05d8..1db4237 100644 --- a/web/nat.py +++ b/web/nat.py @@ -4,7 +4,7 @@ import flask_login from . import db from . import system -blueprint = flask.Blueprint('nat', __name__, url_prefix='/nat') +blueprint = flask.Blueprint('nat', __name__) @blueprint.route('/', methods=('GET', 'POST')) @flask_login.login_required diff --git a/web/rules.py b/web/rules.py index 63b35ba..04cecb4 100644 --- a/web/rules.py +++ b/web/rules.py @@ -4,7 +4,7 @@ import flask_login from . import db from . import system -blueprint = flask.Blueprint('rules', __name__, url_prefix='/rules') +blueprint = flask.Blueprint('rules', __name__) @blueprint.route('/', methods=('GET', 'POST')) @flask_login.login_required diff --git a/web/vpn.py b/web/vpn.py index 465b63a..964bfae 100644 --- a/web/vpn.py +++ b/web/vpn.py @@ -10,7 +10,7 @@ import flask_login from . import db from . import system -blueprint = flask.Blueprint('vpn', __name__, url_prefix='/vpn') +blueprint = flask.Blueprint('vpn', __name__) wgkey_regex = re.compile(r'^[A-Za-z0-9/+=]{44}$') @blueprint.route('/')