include third_party JS and serve it locally

This commit is contained in:
Hendrik L 2024-06-30 17:06:18 +02:00
parent a2bc01f459
commit bf24b1b85a
3 changed files with 5 additions and 1 deletions

File diff suppressed because one or more lines are too long

View file

@ -271,7 +271,7 @@
{% block scripts -%} {% block scripts -%}
{% if not low_bandwidth -%} {% if not low_bandwidth -%}
{{ str(moment.include_moment()).replace('<script>', '<script nonce="' + session['nonce'] + '">')|safe }} {{ str(moment.include_moment(local_js='/static/js/moment-with-locales.min.js')).replace('<script>', '<script nonce="' + session['nonce'] + '">')|safe }}
{{ str(moment.lang(g.locale)).replace('<script>', '<script nonce="' + session['nonce'] + '">')|safe }} {{ str(moment.lang(g.locale)).replace('<script>', '<script nonce="' + session['nonce'] + '">')|safe }}
{% endif -%} {% endif -%}
{% endblock -%} {% endblock -%}

View file

@ -40,6 +40,8 @@ class Config(object):
BOUNCE_USERNAME = os.environ.get('BOUNCE_USERNAME') or '' BOUNCE_USERNAME = os.environ.get('BOUNCE_USERNAME') or ''
BOUNCE_PASSWORD = os.environ.get('BOUNCE_PASSWORD') or '' BOUNCE_PASSWORD = os.environ.get('BOUNCE_PASSWORD') or ''
BOOTSTRAP_SERVE_LOCAL = True
SENTRY_DSN = os.environ.get('SENTRY_DSN') or None SENTRY_DSN = os.environ.get('SENTRY_DSN') or None
AWS_REGION = os.environ.get('AWS_REGION') or None AWS_REGION = os.environ.get('AWS_REGION') or None