Allow actor id to be specified in config
This is useful if the actor won't be at the root of the domain.
This commit is contained in:
parent
0badf0bc1f
commit
2843155501
3 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -5,6 +5,7 @@ admin_password = "$2b$12$OwCyZM33uXQUVrChgER.h.qgFJ4fBp6tdFwArR3Lm1LV8NgMvIxVa"
|
|||
name = "test"
|
||||
summary = "<p>Hello</p>"
|
||||
https = false
|
||||
id = "http://localhost:8000"
|
||||
icon_url = "https://localhost:8000/static/nopic.png"
|
||||
secret = "1dd4079e0474d1a519052b8fe3cb5fa6"
|
||||
debug = true
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue