[1.5.x] Fixed #19875 - Added warnings regarding DEBUG=False and empty ALLOWED_HOSTS

Backport of 4e94c84e50 from master