aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--README.md1
-rw-r--r--walrss/internal/rss/processor.go9
-rw-r--r--walrss/internal/state/state.go2
4 files changed, 12 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d88a36..6045877 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
+### Changed
+* Make including contact information in the user agent optional
## 0.3.8 - 2025-01-18
### Fixed
diff --git a/README.md b/README.md
index 9d52dd0..7bbd5b9 100644
--- a/README.md
+++ b/README.md
@@ -66,6 +66,7 @@ email:
platform:
disableRegistration: false
disableSecureCookies: false
+ contactInformation: "https://example.com" # optional. will be included in the user agent if set.
oidc:
enable: false
clientID: "yourclientid"
diff --git a/walrss/internal/rss/processor.go b/walrss/internal/rss/processor.go
index 2518c5e..ab1b82c 100644
--- a/walrss/internal/rss/processor.go
+++ b/walrss/internal/rss/processor.go
@@ -42,7 +42,14 @@ func getUserAgent(st *state.State) string {
} else if core.Version != "" {
o += "/" + core.Version
}
- o += " (" + st.Config.Platform.ContactInformation + ", https://github.com/codemicro/walrss)"
+
+ var parts []string
+ if st.Config.Platform.ContactInformation != "" {
+ parts = append(parts, st.Config.Platform.ContactInformation)
+ }
+ parts = append(parts, "https://github.com/codemicro/walrss")
+
+ o += " (" + strings.Join(parts, ", ") + ")"
ua.ua = o
})
return ua.ua
diff --git a/walrss/internal/state/state.go b/walrss/internal/state/state.go
index a0d8183..5306503 100644
--- a/walrss/internal/state/state.go
+++ b/walrss/internal/state/state.go
@@ -36,7 +36,7 @@ type Config struct {
Platform struct {
DisableRegistration bool `fig:"disableRegistration"`
DisableSecureCookies bool `fig:"disableSecureCookies"`
- ContactInformation string `fig:"contactInformation" validate:"required"`
+ ContactInformation string `fig:"contactInformation"`
}
OIDC struct {
Enable bool `fig:"enable"`