Commit d5b2bf9f authored by captainwong's avatar captainwong

fix baidu tongji

parent d68c799a
Pipeline #91 canceled with stages
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<title>{{_('Comic Reader')}} | {{title}}</title> <title>{{_('Comic Reader')}} | {{title}}</title>
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes"> <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> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
......
...@@ -83,7 +83,7 @@ except ImportError: ...@@ -83,7 +83,7 @@ except ImportError:
@app.after_request @app.after_request
def add_security_headers(resp): 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:" 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: #if request.endpoint == "editbook.edit_book" or config.config_use_google_drive:
resp.headers['Content-Security-Policy'] += " *" resp.headers['Content-Security-Policy'] += " *"
resp.headers['X-Content-Type-Options'] = 'nosniff' resp.headers['X-Content-Type-Options'] = 'nosniff'
resp.headers['X-Frame-Options'] = 'SAMEORIGIN' resp.headers['X-Frame-Options'] = 'SAMEORIGIN'
......
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