We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05fc419 commit fe076f2Copy full SHA for fe076f2
main.go
@@ -5,6 +5,7 @@ import (
5
"log/slog"
6
"net/http"
7
"os"
8
+ "strings"
9
"time"
10
11
"github.com/caarlos0/starcharts/config"
@@ -48,6 +49,9 @@ func main() {
48
49
Handler(http.FileServer(http.FS(static)))
50
r.Path("/{owner}/{repo}.svg").
51
Methods(http.MethodGet).
52
+ MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) bool {
53
+ return !strings.Contains(r.Header.Get("Accept"), "text/html")
54
+ }).
55
Handler(controller.GetRepoChart(github, cache))
56
r.Path("/{owner}/{repo}").
57
0 commit comments