Skip to content

Commit

Permalink
api- badge- support origin names with hypens
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Apr 17, 2022
1 parent 7981632 commit c81a372
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/handler/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func hGrabInt(s string) (string, int64, error) {
func hBadge(w http.ResponseWriter, r *http.Request, l, m, c string) {
l = strings.ReplaceAll(l, " ", "_")
m = strings.ReplaceAll(m, " ", "_")
l = strings.ReplaceAll(l, "-", "--")
m = strings.ReplaceAll(m, "-", "--")
k := l + "-" + m + "-" + c
w.Header().Add("content-type", "image/svg+xml")
if badgeCache.Has(k) {
Expand Down

0 comments on commit c81a372

Please sign in to comment.