Add debug handler for fetching a remote actor
All checks were successful
/ docker (push) Successful in 3m59s

Will be used later to add to internal db
This commit is contained in:
Melody Becker 2025-04-12 11:47:01 +02:00
parent d4f2f66807
commit f8b3a6ff06
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
12 changed files with 313 additions and 156 deletions

View file

@ -202,6 +202,9 @@ var defaultConfig Config = Config{
},
}
// Get the full domain name of the server, as specified via the config.
//
// Example: "git.mstar.dev" (with subdomain = "git" and domain = "mstar.dev")
func (gc *ConfigGeneral) GetFullDomain() string {
if gc.Subdomain != nil {
return *gc.Subdomain + gc.Domain
@ -209,6 +212,11 @@ func (gc *ConfigGeneral) GetFullDomain() string {
return gc.Domain
}
// Get the public root url of the server, including port (if needed, public takes precedence if set)
// and set protocol
//
// Example: "http://git.mstar.dev:5722" (with Subdomain = "git", domain = "mstar.dev",
// privatePort = 34546, publicPort = 5722 and protocol = "http")
func (gc *ConfigGeneral) GetFullPublicUrl() string {
str := gc.Protocol + "://" + gc.GetFullDomain()
if gc.PublicPort != nil {