changeset 8b4ee2ca7030 in www.tryton.org:default
details: https://hg.tryton.org/www.tryton.org?cmd=changeset&node=8b4ee2ca7030
description:
Remove dynamic redirection for icons font
This does not work with the CDN because of CORS.
diffstat:
app.py | 9 ++-------
gulpfile.js | 2 +-
2 files changed, 3 insertions(+), 8 deletions(-)
diffs (38 lines):
diff -r 8db8ac514c79 -r 8b4ee2ca7030 app.py
--- a/app.py Wed Mar 10 11:44:59 2021 +0100
+++ b/app.py Fri Apr 02 18:48:06 2021 +0200
@@ -160,8 +160,8 @@
'rel': 'preload', 'as': 'font', 'nopush': True,
'crossorigin': True}),
LinkHeader(
- 'fonts', {'name': 'Icons.woff2'}, {
- 'rel': 'prefetch', 'as': 'font', 'nopush': True,
+ 'static', {'filename': 'fonts/Icons.woff2'}, {
+ 'rel': 'preload', 'as': 'font', 'nopush': True,
'crossorigin': True}),
]
@@ -801,11 +801,6 @@
return render_template('service_providers_start.html')
[email protected]('/fonts/<name>')
-def fonts(name):
- return redirect(cdn_url_for('static', filename='fonts/' + name))
-
-
@app.route('/favicon.ico')
def favicon():
return redirect(url_for('static', filename='images/favicon.ico'))
diff -r 8db8ac514c79 -r 8b4ee2ca7030 gulpfile.js
--- a/gulpfile.js Wed Mar 10 11:44:59 2021 +0100
+++ b/gulpfile.js Fri Apr 02 18:48:06 2021 +0200
@@ -61,7 +61,7 @@
.pipe(iconfontCss({
fontName: fontName,
targetPath: '../../sass/iconfont/_icons.scss',
- fontPath: '/fonts/'
+ fontPath: '/static/fonts/'
}))
.pipe(iconfont({
fontName: fontName,