You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@petewalker I would implement this feature by allowing settings.MAINTENANCE_MODE_RESPONSE_TYPE to accept a path to a callable that will be called passing the request as argument, and it should return "html" or "json".
What you think about it? Do you have any suggestion?
In our application, we have a mix of JSON API endpoints and HTML pages.
All of our API endpoints are prefixed with the path
/api
.It would be good if we could conditionally return a JSON response for our
/api
endpoints and a HTML response for all others.Is it possible to make this configurable? In the interim as workaround, I guess we could subclass your middleware?
Upvote & Fund
The text was updated successfully, but these errors were encountered: