mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-21 08:30:58 +00:00
Add --disable-web-ui
This commit is contained in:
parent
f75a294aa0
commit
6b18b23b46
4 changed files with 36 additions and 21 deletions
|
@ -209,6 +209,9 @@ def create_app(args):
|
|||
@app.route("/")
|
||||
@limiter.exempt
|
||||
def index():
|
||||
if args.disable_web_ui:
|
||||
abort(404)
|
||||
|
||||
return render_template(
|
||||
"index.html",
|
||||
gaId=args.ga_id,
|
||||
|
@ -221,6 +224,9 @@ def create_app(args):
|
|||
@app.route("/javascript-licenses", methods=["GET"])
|
||||
@limiter.exempt
|
||||
def javascript_licenses():
|
||||
if args.disable_web_ui:
|
||||
abort(404)
|
||||
|
||||
return render_template("javascript-licenses.html")
|
||||
|
||||
@app.route("/languages", methods=["GET", "POST"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue