1
0
Fork 0

resolve SECURE_FETCH bugs

ERROR HANDLING FIXES

- use raise_for_status() to pass through response code
- handle exceptions where no response object is passed through

INSTANCE ACTOR

- models.User.objects.create_user function cannot take an ID
- allow instance admins to determine username and email for instance actor in settings.py
This commit is contained in:
Hugh Rundle 2023-01-20 16:32:17 +11:00
parent 0da5473b0c
commit 4108238716
3 changed files with 24 additions and 21 deletions

View file

@ -370,3 +370,8 @@ TWO_FACTOR_LOGIN_MAX_SECONDS = 60
HTTP_X_FORWARDED_PROTO = env.bool("SECURE_PROXY_SSL_HEADER", False)
if HTTP_X_FORWARDED_PROTO:
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
# AUTHORIZED_FETCH Instance Actor
# WARNING this must both be unique - not used by any other user
INSTANCE_ACTOR_USERNAME = DOMAIN
INSTANCE_ACTOR_EMAIL = f"representative@{DOMAIN}"