0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-07 22:25:35 +00:00
healthchecks_healthchecks/hc/api
Pēteris Caune 45b8bd64df
Simplify hosting under subpath
Instead of using SCRIPT_NAME / FORCE_SCRIPT_NAME, PATH_INFO
and their associated issues, update urls.py to add the subpath
to all routes. This allows us to get rid of several hacks:

* the uwsgi.ini magic which parses SITE_ROOT, sets SCRIPT_NAME
  and fixes PATH_INFO
* set_script_prefix() in sendalerts
* chopping the subpath off an URL in hc.accounts.views._allow_redirect

The idea comes from @apollo13
in https://code.djangoproject.com/ticket/35985#comment:5

cc: 
2024-12-19 09:04:45 +02:00
..
management Simplify hosting under subpath 2024-12-19 09:04:45 +02:00
migrations Add index on api_flip (owner_id, created) 2024-12-03 10:37:01 +02:00
tests Update SMS notification template to include failure reason 2024-12-18 12:31:22 +02:00
__init__.py Renames 2015-06-12 19:33:15 +03:00
admin.py Move absolute URL construction to hc.lib.urls.absolute_reverse() 2024-12-03 17:24:27 +02:00
apps.py Update settings.py to read SECURE_PROXY_SSL_HEADER from env vars 2024-10-01 19:13:26 +03:00
decorators.py Improve type hints in hc.api.decorators 2023-10-20 18:41:11 +03:00
forms.py Improve type hints 2023-10-25 18:12:12 +03:00
models.py Move repeating flip reason descriptions to Flip.reason_long() 2024-12-16 14:35:36 +02:00
transports.py Update SMS notification template to include failure reason 2024-12-18 12:31:22 +02:00
urls.py Add support for per-check status badges 2024-02-27 12:55:51 +02:00
views.py Fix auto-fixable ruff warnings 2024-11-07 15:15:58 +02:00