From 827c9e5e3e60167ac28806524074b2fb5cc74188 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Thu, 24 Oct 2024 12:10:43 +0300 Subject: [PATCH] feat: APIUrl include protocol --- internal/components/manage.templ | 2 +- internal/config/config.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/components/manage.templ b/internal/components/manage.templ index 790d829..dd1fab5 100644 --- a/internal/components/manage.templ +++ b/internal/components/manage.templ @@ -8,7 +8,7 @@ func getDomainPattern() string { } func getUpdateACommand() string { - return fmt.Sprintf("curl \"https://%s/update/a?domain=THE_PART_YOU_DEFINE&api_key=THE_API_KEY\"", + return fmt.Sprintf("curl \"%s/update/a?domain=THE_PART_YOU_DEFINE&api_key=THE_API_KEY\"", config.FeluConfig.APIUrl) } diff --git a/internal/config/config.go b/internal/config/config.go index 5210add..5322804 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -17,8 +17,6 @@ type config struct { ServiceName string DDNSDomain string - // API url, where the API is served at (e.g. api.feluddns.tld) - APIUrl string SOAEmail string @@ -34,6 +32,8 @@ type config struct { FrontendBindAddr string + // API url, where the API is served at (e.g. https://api.felud.arpa) + APIUrl string APIBindAddr string DNSBindIP string -- 2.44.1