Commit d5b2bf9f authored by captainwong's avatar captainwong

fix baidu tongji

parent d68c799a
Pipeline #91 canceled with stages
......@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......
......@@ -7,7 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......
......@@ -8,7 +8,6 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......@@ -18,7 +17,7 @@
s.parentNode.insertBefore(hm, s);
})();
</script>
<script src="{{ url_for('static', filename='js/libs/jquery.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/libs/soundmanager2.js') }}"></script>
<script src="{{ url_for('static', filename='js/libs/bar-ui.js') }}"></script>
......
......@@ -7,7 +7,6 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......
......@@ -7,7 +7,6 @@
<title>{{_('Comic Reader')}} | {{title}}</title>
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......
......@@ -7,7 +7,6 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......
......@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://hm.baidu.com 'unsafe-inline' 'unsafe-eval'">
<script>
var _hmt = _hmt || [];
(function() {
......
......@@ -83,8 +83,8 @@ except ImportError:
@app.after_request
def add_security_headers(resp):
resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src 'self' data:"
if request.endpoint == "editbook.edit_book" or config.config_use_google_drive:
resp.headers['Content-Security-Policy'] += " *"
#if request.endpoint == "editbook.edit_book" or config.config_use_google_drive:
resp.headers['Content-Security-Policy'] += " *"
resp.headers['X-Content-Type-Options'] = 'nosniff'
resp.headers['X-Frame-Options'] = 'SAMEORIGIN'
resp.headers['X-XSS-Protection'] = '1; mode=block'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment