mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-19 07:14:24 +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 := ""
|
textImageURL := ""
|
||||||
description := ""
|
description := ""
|
||||||
if useTextImage {
|
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 subject != "" {
|
||||||
if seenOnRelays != "" {
|
if seenOnRelays != "" {
|
||||||
description = fmt.Sprintf("%s -- %s", subject, 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 {
|
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"))
|
ua := strings.ToLower(r.Header.Get("User-Agent"))
|
||||||
accept := r.Header.Get("Accept")
|
accept := r.Header.Get("Accept")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user