Commit Graph

25 Commits

Author SHA1 Message Date
zjean 2c10fc03a5
Exclude /api from PROXY forward auth (#790)
* Update middleware.py

* Fix gulp

* Call super()

* Fix comment formatting

* Super duper

---------

Co-authored-by: Christopher Charbonneau Wells <10456740+cdubz@users.noreply.github.com>
2024-04-13 08:19:17 -07:00
Christopher Charbonneau Wells 49d8f2b340
Update to Django 5.x (#746) 2024-01-13 20:22:08 -08:00
Paul Konstantin Gerke c1eb9da7f3 Black 2023-07-05 14:32:26 -07:00
Paul Konstantin Gerke b88d0cf897 Docstring for middleware, refactored middleware a bit 2023-07-05 14:32:26 -07:00
Paul Konstantin Gerke 643c9bec13 Black 2023-07-05 14:32:26 -07:00
Paul Konstantin Gerke bb871257ff Expose session-header in case the home assistant ingress-server is used 2023-07-05 14:32:26 -07:00
Paul Konstantin Gerke 1a946a2228 Add middleware and setting for x-ingress-path interpretation 2023-07-05 14:32:26 -07:00
Christopher C. Wells 5875ef9658 Remove support for 24H time format override 2023-03-25 14:29:35 -07:00
Christopher C. Wells f155caa268 Remove deprecated `TIME_ZONE` environment variable configuration
Closes #301
2023-03-25 12:59:32 -07:00
EnsuingRequiem 46159850c4
Add forward auth by way of remote user
* Add forward auth related settings

* Document forward auth settings

* Rearrange code to match preference

* Adjust forward auth configuration

* Add tests for reverse proxy auth

Closes #517 

Co-authored-by: Christopher C. Wells <git-2022@chris-wells.net>
2022-09-18 14:00:41 -07:00
Christopher C. Wells cd946280cb Format code with black 2022-02-09 16:00:30 -08:00
Christopher C. Wells 9585443218 Revert "Treat `en` as `en-US` for date formatting"
This reverts commit c06ce032. Proper handling for this language setting is
added in commit 59372a01.
2021-12-14 09:25:21 -05:00
Christopher C. Wells c06ce0325b Treat `en` as `en-US` for date formatting
Fixes #337
2021-12-13 16:28:53 -05:00
Christopher C. Wells f0a7f53752 Merge remote-tracking branch 'origin/master' into 333-en-gb-datetimeformat 2021-11-28 14:44:36 -05:00
Christopher C. Wells 4920f4341b Use request language code when available (#346)
Enables translation on the login page.
2021-11-28 14:18:00 -05:00
Christopher C. Wells c28620b3d8 Activate and deactivate user language in middleware
Fixes #346
2021-11-28 14:02:23 -05:00
Amith211 429c85cd5a
fix en_GB display format 2021-11-15 17:30:12 +00:00
Amith211 36318a05e3
add en-gb datetime overrides
close #333
2021-11-14 01:18:29 +00:00
Christopher Charbonneau Wells d74f35d765
Handle format customization in middelware (#332)
This is done to allow for format difference between `en-US` (`en`) and `en-GB` that are not well supported by Django's format handling.
2021-11-12 10:13:08 -08:00
Christopher C. Wells b5d9875e9a Fix linting issues 2021-10-26 19:55:16 -07:00
Christopher C. Wells 0efe0e4f0b Remove deprecated use of session-based language handling
Session-based language handling is deprecated in Django 3.x and will be
removed in 4.x.

https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#explicitly-setting-the-active-language
2021-10-26 19:55:16 -07:00
Christopher C. Wells f29269869c Only add sessions refresh data to existing sessions
Prior to change session were created for _every_ request (including API
requests).
2021-08-05 06:34:08 -07:00
Peter Hardy 2806d0a22f The rest of the middleware commit 2020-05-17 20:11:08 +10:00
Peter Hardy 1d9a7d4215 Adds rolling session refresh middleware (#130) 2020-05-17 16:57:00 +10:00
Christopher C. Wells c05ce176fc Persist user timezone setting with middleware 2020-02-14 12:45:24 -08:00