diff --git a/app/config.py b/app/config.py index dfd6ec9..cc20ed5 100644 --- a/app/config.py +++ b/app/config.py @@ -90,6 +90,7 @@ class Config(pydantic.BaseModel): name: str summary: str https: bool + id: str = None icon_url: str secret: str debug: bool = False @@ -146,6 +147,8 @@ CONFIG = load_config() DOMAIN = CONFIG.domain _SCHEME = "https" if CONFIG.https else "http" ID = f"{_SCHEME}://{DOMAIN}" +if CONFIG.id: + ID = CONFIG.id USERNAME = CONFIG.username MANUALLY_APPROVES_FOLLOWERS = CONFIG.manually_approves_followers HIDES_FOLLOWERS = CONFIG.hides_followers diff --git a/data/tests.toml b/data/tests.toml index cf7b5f9..909b4a3 100644 --- a/data/tests.toml +++ b/data/tests.toml @@ -5,6 +5,7 @@ admin_password = "$2b$12$OwCyZM33uXQUVrChgER.h.qgFJ4fBp6tdFwArR3Lm1LV8NgMvIxVa" name = "test" summary = "

Hello

" https = false +id = "http://localhost:8000" icon_url = "https://localhost:8000/static/nopic.png" secret = "1dd4079e0474d1a519052b8fe3cb5fa6" debug = true diff --git a/scripts/config_wizard.py b/scripts/config_wizard.py index 22119e6..f5a75a2 100644 --- a/scripts/config_wizard.py +++ b/scripts/config_wizard.py @@ -74,6 +74,8 @@ def main() -> None: dat["https"] = False proto = "http" + dat["id"] = f'{proto}://{dat["domain"]}' + print("Note that you can put your icon/avatar in the static/ directory") dat["icon_url"] = prompt( "icon URL: ", default=f'{proto}://{dat["domain"]}/static/nopic.png'