diff --git a/app.py b/app.py index 996593d5..488ea463 100644 --- a/app.py +++ b/app.py @@ -24,11 +24,18 @@ def find_key(token): csp = { "default-src": "'none'", "style-src": ["'self'", "'unsafe-inline'"], - "script-src": ["'self'", "*", "'unsafe-inline'", "'unsafe-eval'"], + "script-src": [ + "'self'", + "*.cloudflare.com", + "*.googletagmanager.com", + "*.google-analytics.com", + "'unsafe-inline'", + "'unsafe-eval'", + ], "form-action": "'self'", "base-uri": "'self'", "img-src": "*", - "frame-src": ["ghbtns.com", "googleads.g.doubleclick.net"], + "frame-src": "ghbtns.com", "frame-ancestors": "'none'", "object-src": "'none'", } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 266f5a87..7c4c3001 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -12,14 +12,5 @@ gtag('config', '{{ tracking_id }}'); {% endif -%} -{%- if google_ad_client %} - - -{% endif -%} {% endblock %} {% set css_files = css_files + [ "_static/style.css" ] %} diff --git a/docs/conf.py b/docs/conf.py index eb7ac9c3..9d0881dc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,10 +132,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". html_title = "pysheeet" -html_context = { - "tracking_id": os.environ.get("TRACKING_ID"), - "google_ad_client" : os.environ.get("GOOGLE_AD_CLIENT") -} +html_context = {"tracking_id": os.environ.get("TRACKING_ID")} # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None