Add LibreJS support

This commit is contained in:
jdu9 2021-03-31 17:57:02 +02:00
parent 1945f5235c
commit ae76d7efb4
3 changed files with 34 additions and 3 deletions

View file

@ -43,7 +43,7 @@ def get_routes_limits(default_req_limit, api_keys_db):
req_limit = db_req_limit
return "%s per minute" % req_limit
return [limits]
def create_app(args):
@ -102,6 +102,11 @@ def create_app(args):
def index():
return render_template('index.html', gaId=args.ga_id, frontendTimeout=args.frontend_timeout, offline=args.offline, api_keys=args.api_keys, web_version=os.environ.get('LT_WEB') is not None)
@app.route("/javascript-licenses", methods=['GET'])
@limiter.exempt
def javascript_licenses():
return render_template('javascript-licenses.html', offline=args.offline)
@app.route("/languages", methods=['GET', 'POST'])
@limiter.exempt
def langs():