querystring helper for debugging image generation.

This commit is contained in:
fiatjaf
2023-10-10 09:35:47 -03:00
parent e5d37ece3c
commit 75189d8bec
2 changed files with 6 additions and 1 deletions

View File

@@ -160,6 +160,11 @@ func generateClientList(code string, event *nostr.Event) []ClientReference {
}
func getPreviewStyle(r *http.Request) string {
if style := r.URL.Query().Get("style"); style != "" {
// debug mode
return style
}
ua := strings.ToLower(r.Header.Get("User-Agent"))
accept := r.Header.Get("Accept")