Skip to content

Commit

Permalink
Check if Matomo URL is ending with '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
djamg committed Jul 19, 2023
1 parent 0488d09 commit 2aa3449
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/baseframe/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def init_app(
raise ValueError("App has misconfigured secret keys")
app.session_interface = RotatingKeySecureCookieSessionInterface()

# Check if Matomo URL is ending with '/' or else add it
if app.config.get('MATOMO_URL') and not app.config['MATOMO_URL'].endswith('/'):
app.config['MATOMO_URL'] += '/'
# Default .js and tracking file for Matomo
if app.config.get('MATOMO_URL') and app.config.get('MATOMO_ID'):
app.config.setdefault('MATOMO_JS', 'matomo.js')
Expand Down

0 comments on commit 2aa3449

Please sign in to comment.