Requests to API should not trigger session middleware

RESOLVED DUPLICATE of bug 987932

Status

Marketplace
API
P4
normal
RESOLVED DUPLICATE of bug 987932
5 years ago
4 years ago

People

(Reporter: ashort, Unassigned)

Tracking

x86
Mac OS X
Points:
---

Details

(Whiteboard: [repoman])

(Reporter)

Description

5 years ago
Right now requests to API URLs are still handled by django.contrib.auth middleware which results in user lookup being done for session cookies if they exist. (request.user is initialized as a lazy object there but commonware.log has middleware that looks up the username for logging, so it's always accessed.)

Since the API doesn't use session auth, we should find a way to skip this to avoid a useless DB hit.
(Reporter)

Updated

5 years ago
Priority: -- → P5

Updated

5 years ago
Blocks: 926640
Severity: enhancement → normal
Priority: P5 → P4
Whiteboard: [repoman]
Fixed by https://github.com/mozilla/zamboni/commit/cd15e17284187212f70a34edff6544ddb699e8d0.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 987932
You need to log in before you can comment on or make changes to this bug.