mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 04:20:17 +02:00
[ADD] Check for empty SITE_URL
This commit is contained in:
parent
28cb62f373
commit
929485a8f9
@ -31,8 +31,10 @@ def django_settings(app_configs, **kwargs) -> List[CheckMessage]:
|
||||
|
||||
# SITE_URL
|
||||
if hasattr(settings, "SITE_URL"):
|
||||
if settings.SITE_URL[-1] == "/":
|
||||
errors.append(Warning("'SITE_URL' Has a trailing slash. This may lead to incorrect links being generated by Auth.", hint="", id="allianceauth.checks.B005"))
|
||||
if settings.SITE_URL == "":
|
||||
errors.append(Error("'SITE_URL' is empty.", hint="Make sure to set 'SITE_URL' to the URL of your Auth instance. (Without trailing slash)", id="allianceauth.checks.B011"))
|
||||
elif settings.SITE_URL[-1] == "/":
|
||||
errors.append(Warning("'SITE_URL' has a trailing slash. This may lead to incorrect links being generated by Auth.", hint="", id="allianceauth.checks.B005"))
|
||||
else:
|
||||
errors.append(Error("No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules.", hint="", id="allianceauth.checks.B006"))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user