Add support for not using CDN-based resources. When USE_CDN = False, all CDN-based resources will instead be used from the local system.
This commit is contained in:
parent
027ada1f5c
commit
08ccad7fe4
5 changed files with 101 additions and 17 deletions
|
@ -17,6 +17,7 @@ from endpoints.api.discovery import swagger_route_data
|
|||
from werkzeug.routing import BaseConverter
|
||||
from functools import wraps
|
||||
from config import getFrontendVisibleConfig
|
||||
from external_libraries import get_external_javascript, get_external_css
|
||||
|
||||
import features
|
||||
|
||||
|
@ -147,7 +148,12 @@ def render_page_template(name, **kwargs):
|
|||
main_scripts = ['dist/quay-frontend.min.js']
|
||||
cache_buster = random_string()
|
||||
|
||||
external_styles = get_external_css(local=not app.config.get('USE_CDN', True))
|
||||
external_scripts = get_external_javascript(local=not app.config.get('USE_CDN', True))
|
||||
|
||||
resp = make_response(render_template(name, route_data=json.dumps(get_route_data()),
|
||||
external_styles=external_styles,
|
||||
external_scripts=external_scripts,
|
||||
main_styles=main_styles,
|
||||
library_styles=library_styles,
|
||||
main_scripts=main_scripts,
|
||||
|
|
Reference in a new issue