烧瓶静态设置:
app = Flask(__name__.split('.')[0], static_folder=None)
app.static_url_path = '/static'
app.static_folder = 'static'
app.add_url_rule(app.static_url_path + '/<path:filename>',
endpoint='static',
view_func=app.send_static_file)
Run Code Online (Sandbox Code Playgroud)
CSS
@font-face {
font-family: MuiiconSpread;
font-weight: normal;
font-style: normal;
src: url('../fonts/icons.ttf') format('truetype');
}
Run Code Online (Sandbox Code Playgroud)
JS
require.config({
paths: {
'jquery': '/static/plugins/jquery-3.3.1/jquery.min',
},
});
Run Code Online (Sandbox Code Playgroud)
当访问子域名如: 时a.test.com
,icons.ttf
和jquery.min.js
都是404错误。
当我添加subdomain='a'
静态add_url_rule
时,一切都会好起来的。但它只是匹配a.test.com
,而访问b.test.com
应该将相同的配置更改为subdomain='b'
.
如何修复它?
当我使用 IE10 时,一切都很好。但是 IE11、固定按钮和“Ctrl+P”不起作用。我的系统是 Windows 7 Ultimate 64 位 SP1。