diff --git a/app.py b/app.py index 488ea463..996593d5 100644 --- a/app.py +++ b/app.py @@ -24,18 +24,11 @@ def find_key(token): csp = { "default-src": "'none'", "style-src": ["'self'", "'unsafe-inline'"], - "script-src": [ - "'self'", - "*.cloudflare.com", - "*.googletagmanager.com", - "*.google-analytics.com", - "'unsafe-inline'", - "'unsafe-eval'", - ], + "script-src": ["'self'", "*", "'unsafe-inline'", "'unsafe-eval'"], "form-action": "'self'", "base-uri": "'self'", "img-src": "*", - "frame-src": "ghbtns.com", + "frame-src": ["ghbtns.com", "googleads.g.doubleclick.net"], "frame-ancestors": "'none'", "object-src": "'none'", } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 7cf23ad4..9e7ec135 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -11,5 +11,14 @@ 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 9d0881dc..eb7ac9c3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,7 +132,10 @@ # 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")} +html_context = { + "tracking_id": os.environ.get("TRACKING_ID"), + "google_ad_client" : os.environ.get("GOOGLE_AD_CLIENT") +} # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None