diff options
author | Anthony Wang | 2022-06-16 14:18:30 -0500 |
---|---|---|
committer | Anthony Wang | 2022-06-16 14:18:30 -0500 |
commit | 7a214dd212c7835e424b9113bdcb33d984f0500b (patch) | |
tree | 0b4cdf06944d37dfcd7039f6d0fa08570f059aaf | |
parent | b35490c53d5b87e3e23d01869630ab029668e47f (diff) |
More code cleanup
-rw-r--r-- | custom/conf/app.example.ini | 2 | ||||
-rw-r--r-- | modules/activitypub/client.go | 1 | ||||
-rw-r--r-- | modules/activitypub/main_test.go | 5 |
3 files changed, 6 insertions, 2 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 5b8d50537..4b258d569 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -2255,6 +2255,8 @@ PATH = ;; Maximum federation request and response size (MB) ; MAX_SIZE = 4 ;; +;; WARNING: Changing the settings below can break federation. +;; ;; HTTP signature algorithms ; ALGORITHMS = rsa-sha256, rsa-sha512 ;; diff --git a/modules/activitypub/client.go b/modules/activitypub/client.go index 8c2854f71..46b8c675b 100644 --- a/modules/activitypub/client.go +++ b/modules/activitypub/client.go @@ -28,6 +28,7 @@ const ( ) // Gets the current time as an RFC 2616 formatted string +// RFC 2616 requires RFC 1123 dates but with GMT instead of UTC func CurrentTime() string { return strings.ReplaceAll(time.Now().UTC().Format(time.RFC1123), "UTC", "GMT") } diff --git a/modules/activitypub/main_test.go b/modules/activitypub/main_test.go index 289bc9f32..7fa2b0926 100644 --- a/modules/activitypub/main_test.go +++ b/modules/activitypub/main_test.go @@ -12,6 +12,7 @@ import ( ) func TestMain(m *testing.M) { - testOps := unittest.TestOptions{GiteaRootPath: filepath.Join("..", "..")} - unittest.MainTest(m, &testOps) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", ".."), + }) } |