Skip to content

Commit 728173d

Browse files
committed
Add subdomains of localhost to the default DEBUG mode allowed_hosts
1 parent a135228 commit 728173d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

channels/security/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def AllowedHostsOriginValidator(application):
140140
"""
141141
allowed_hosts = settings.ALLOWED_HOSTS
142142
if settings.DEBUG and not allowed_hosts:
143-
allowed_hosts = ["localhost", "127.0.0.1", "[::1]"]
143+
allowed_hosts = [".localhost", "127.0.0.1", "[::1]"]
144144
return OriginValidator(application, allowed_hosts)
145145

146146

0 commit comments

Comments
 (0)