Changes between Initial Version and Version 1 of Ticket #32005
- Timestamp:
- Sep 15, 2020, 1:41:24 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32005
- Property Type Uncategorized → New feature
-
Ticket #32005 – Description
initial v1 1 1 This is related to the last two comments on #17734. Specifically, if an application decides to return an explicit 404, there is no way to prevent the LocaleMiddleware from overriding this and trying the language redirect. 2 2 3 In those comments, it was about catch-all URL patterns. I'm running into something related, but slightly different -- we [ serve 404's for the `/` endpoint if the subdomain isn't valid](https://github.com/zulip/zulip/blob/master/zerver/middleware.py#L434), which the LocaleMiddleware unhelpfully redirects to (e.g.) `/en/` which isn't any less of a 404.3 In those comments, it was about catch-all URL patterns. I'm running into something related, but slightly different -- we [https://github.com/zulip/zulip/blob/master/zerver/middleware.py#L434 serve 404's for the `/` endpoint if the subdomain isn't valid], which the LocaleMiddleware unhelpfully redirects to (e.g.) `/en/` which isn't any less of a 404. 4 4 5 5 Would folks be amenable to a patch which disabled the auto-404-redirect functionality in the middleware with a flag of some sort?