From ff4ff15e4ec53155120a92b5933ea4bd7916bf9c Mon Sep 17 00:00:00 2001 From: Aterfax Date: Fri, 23 Aug 2024 13:08:26 +0100 Subject: [PATCH] website/integrations: Correct Discord avatar code and add warning. (#11031) There's a mispelling which causes the avatar gathered to not be the desired size. Additionally, larger avatars appear to cause "Header too large" errors when users attempt to access services (at least for me via a proxy providers.) This can also be seen users have a very large JWT in their request headers. (You can use https://github.com/traefik/whoami for debugging). Signed-off-by: Aterfax --- website/docs/sources/discord/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/sources/discord/index.md b/website/docs/sources/discord/index.md index 9970a12da270..faf631021d36 100644 --- a/website/docs/sources/discord/index.md +++ b/website/docs/sources/discord/index.md @@ -327,10 +327,10 @@ Create a new **Expression Policy** with the content below, adjusting the variabl import base64 import requests -AVATAR_SIZE = "64" # Valid values: 16,32,64,128,256,512,1024 +AVATAR_SIZE = "64" # Valid values: 16,32,64,128,256,512,1024. Larger values may cause HTTP error 431 on applications/providers due to headers being too large. # Only change below here if you know what you are doing. -AVATAR_URL = "https://cdn.discordapp.com/avatars/{id}/{avatar}.png?site={avatar_size}" +AVATAR_URL = "https://cdn.discordapp.com/avatars/{id}/{avatar}.png?size={avatar_size}" AVATAR_STREAM_CONTENT = "data:image/png;base64,{base64_string}" # Converts base64 image into html syntax usable with authentik's avatar attributes feature