From b42cb7a802096762cbffb0fa1177c8355898cc1c Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:48:09 +0000 Subject: [feature] Add warning about `trusted-proxies` to make config easier (#3675) * [feature] Add warning about `trusted-proxies` to make config easier * thank you linter, hugs and kisses to you --- web/template/page_header.tmpl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'web/template') diff --git a/web/template/page_header.tmpl b/web/template/page_header.tmpl index 388587aaf..f2349581e 100644 --- a/web/template/page_header.tmpl +++ b/web/template/page_header.tmpl @@ -17,6 +17,29 @@ // along with this program. If not, see . */ -}} +{{- define "trustedProxiesRec" -}} +{{- .with }} +
+

+ Warning! It looks like trusted-proxies is not set correctly in this instance's configuration. + This may cause rate-limiting issues and, by extension, federation issues. +

+

+ If you are the instance admin, you should fix this by adding {{- .trustedProxiesRec -}} to your trusted-proxies. +

+

+ For more information, see + + the documentation + . +

+
+{{- end -}} + {{- define "thumbnailDescription" -}} {{- if .instance.ThumbnailDescription -}} {{- .instance.ThumbnailDescription -}} @@ -56,6 +79,9 @@ Instance Logo {{- end -}} {{- with . }} +{{- if .trustedProxiesRec }} +{{- template "trustedProxiesRec" . }} +{{- end }} {{- if .instance.ThumbnailStatic }} -- cgit v1.3