From f6a2884132f8dea224b9ede36e814f15f58d9d10 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Tue, 25 May 2021 17:32:01 +0200 Subject: [PATCH] Serve /api/events This patch makes the API serve /api/events directly, instead of sending a redirect to /api/events/. This prevents requests in the user interface and potential mixed content violations if the interface address is set to HTTP. --- pyca/ui/jsonapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyca/ui/jsonapi.py b/pyca/ui/jsonapi.py index ca9b6642..b589e74f 100644 --- a/pyca/ui/jsonapi.py +++ b/pyca/ui/jsonapi.py @@ -78,7 +78,7 @@ def internal_state(): return make_response(jsonify({'meta': data})) -@app.route('/api/events/') +@app.route('/api/events') @requires_auth @jsonapi_mediatype @with_session