fix: Add CSRF exempt for analytics API endpoints
This commit is contained in:
parent
986fa457cc
commit
f3433d28f5
2
app.py
2
app.py
@ -3100,6 +3100,7 @@ def api_notifications_unread_count():
|
||||
# ============================================================
|
||||
|
||||
@app.route('/api/analytics/track', methods=['POST'])
|
||||
@csrf.exempt
|
||||
def api_analytics_track():
|
||||
"""Track clicks and interactions from frontend"""
|
||||
data = request.get_json()
|
||||
@ -3157,6 +3158,7 @@ def api_analytics_track():
|
||||
|
||||
|
||||
@app.route('/api/analytics/heartbeat', methods=['POST'])
|
||||
@csrf.exempt
|
||||
def api_analytics_heartbeat():
|
||||
"""Keep session alive and update duration"""
|
||||
analytics_session_id = session.get('analytics_session_id')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user