mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
querystring helper for debugging image generation.
This commit is contained in:
@@ -136,7 +136,7 @@ func render(w http.ResponseWriter, r *http.Request) {
|
||||
textImageURL := ""
|
||||
description := ""
|
||||
if useTextImage {
|
||||
textImageURL = fmt.Sprintf("https://%s/njump/image/%s", host, code)
|
||||
textImageURL = fmt.Sprintf("https://%s/njump/image/%s?%s", host, code, r.URL.RawQuery)
|
||||
if subject != "" {
|
||||
if seenOnRelays != "" {
|
||||
description = fmt.Sprintf("%s -- %s", subject, seenOnRelays)
|
||||
|
||||
5
utils.go
5
utils.go
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user