zulip/zproject
Greg Price 4374ee403d push_notifs: In dev, use EXTERNAL_HOST directly as bouncer
The `push.{EXTERNAL_HOST}` formula effectively assumes that the host
in EXTERNAL_HOST is zulipdev.com -- it's relying on the fact that
push.zulipdev.com is in DNS as an alias of zulipdev.com.  That's a
special fact that wouldn't be true of most hostnames.

It especially isn't true of IP addresses.  If one has set
EXTERNAL_HOST to a value like `192.168.0.2:9991` -- for example in
order to reach the dev server from a separate machine, such as a
physical mobile device:
  https://github.com/zulip/zulip-mobile/blob/main/docs/howto/dev-server.md
then setting ZULIP_SERVICES_URL to `http://push.192.168.0.2:9991`
is definitely not going to work.  For example:
  https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/notifications.20from.20dev.20server/near/2159863

In the dev server, the point with ZULIP_SERVICES_URL is that it
should point back to the same dev server.  So use a formula that
says that more directly and so more reliably.

Tests are a different matter: we want a distinct URL there, because
we'll be inspecting the URLs in requests.  But in tests there's also
no requirement that the two hosts have anything to do with each
other; so the existing formula is fine there, and keep it in place.

(In tests it'd probably be better to use proper RFC 6761 test
domains, like `chat.example.com` and `push.example.net`.  But
that's an independent question.)
2025-04-28 20:24:05 -07:00
..
jinja2 realm-deactivation: Send email to owners as part of deactivation. 2024-06-26 16:48:18 -07:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py ldap: Fix the syncing of user role via AUTH_LDAP_USER_FLAGS_BY_GROUP. 2025-04-28 17:44:56 -07:00
computed_settings.py signup: Add optional Altcha to realm registration. 2025-04-23 17:18:40 -07:00
config.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
configured_settings.py settings: Print about custom settings from runtornado. 2023-12-05 12:33:34 -08:00
default_settings.py signup: Add optional Altcha to realm registration. 2025-04-23 17:18:40 -07:00
dev_settings.py push_notifs: In dev, use EXTERNAL_HOST directly as bouncer 2025-04-28 20:24:05 -07:00
dev_urls.py showroom: Rename dev/design-testing -> showroom. 2025-01-13 17:46:15 -08:00
email_backends.py send_email: Set the Date header according to local enqueue time. 2025-03-10 16:48:08 -07:00
prod_settings_template.py s3: Support non-AWS S3 providers which do not support request checksums. 2025-04-10 11:11:25 -07:00
prod_settings.pyi lint: Replace pycodestyle and pyflakes with ruff. 2022-11-03 12:10:15 -07:00
sentry.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
settings_types.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
settings.py settings: Hide django_stubs_ext from mypy. 2024-04-17 16:49:03 -07:00
template_loaders.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
test_extra_settings.py push_notifs: In dev, use EXTERNAL_HOST directly as bouncer 2025-04-28 20:24:05 -07:00
test_settings.py settings: Refactor how TEST_SUITE is configured. 2023-12-04 09:50:14 -08:00
urls.py signup: Add optional Altcha to realm registration. 2025-04-23 17:18:40 -07:00
wsgi.py restart-server: Wait until chain reload has completed. 2024-08-29 12:12:34 -07:00