feat(server): adds support for subdomain aliases and domains #141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/aliases-and-domains"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
refactor(server): moves server state to a separate module
Closes #70
I'm really not sure domains/host resolution should be enabled by default. I still don't have a plan for TLS termination and am not sure it's the time to add it.
The code is there, but maybe it should be behind a feature flag? Or at least an CLI option for the server. Might trip up clients that way, though.
@ -105,0 +145,4 @@fn is_alias_valid(alias: &String) -> bool {// exclude certain potential conflictslet invalid = INVALID_ALIASES.contains(&alias.as_str());technically could bail early with an if statement and save the few cycles used for the regex.
@ -0,0 +15,4 @@pub static TMPL_ENV: OnceLock<minijinja::Environment> = OnceLock::new();pub static BACKEND: OnceLock<BoxedBackend> = OnceLock::new();pub static DATABASE: OnceLock<BoxedDatabase> = OnceLock::new();pub static KEY_RESOLVER: OnceLock<BoxedKeyResolver> = OnceLock::new();maybe not the time, but consider throwing some of the more trivial things into a struct (e.g. name, is_proxied)
@ -166,6 +166,7 @@ impl<'de> Visitor<'de> for KeyIdVisitor {}/// A short representation of a Key ID as a 7-char hex string// TODO: re-implement this to be bytes so it can be thrown on the stackmaybe create an issue to track this TODO, seems useful
#144