mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
auth: Use HTTP status 404 for invalid realms.
Apparently, our invalid realm error page had HTTP status 200, which could be confusing and in particular broken our mobile app's error handling for this case.
This commit is contained in:
@@ -373,7 +373,7 @@ class SessionHostDomainMiddleware(SessionMiddleware):
|
||||
if subdomain != Realm.SUBDOMAIN_FOR_ROOT_DOMAIN:
|
||||
realm = get_realm(subdomain)
|
||||
if (realm is None):
|
||||
return render(request, "zerver/invalid_realm.html")
|
||||
return render(request, "zerver/invalid_realm.html", status=404)
|
||||
"""
|
||||
If request.session was modified, or if the configuration is to save the
|
||||
session every time, save the changes and set a session cookie or delete
|
||||
|
||||
Reference in New Issue
Block a user