improve tracking

This commit is contained in:
JurajKubrican
2025-09-08 12:38:59 +02:00
parent 0323212d9d
commit bc0841c3c0
3 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ jobs:
run: |
docker run -d --name temp-$IMAGE_NAME -p $TEST_PORT:54321 $IMAGE_NAME:latest
sleep 10 # Wait for the container to start
if curl -f http://localhost:$TEST_PORT/health; then
if curl -f --max-time 10 http://localhost:$TEST_PORT/health; then
echo "Health check passed"
docker stop temp-$IMAGE_NAME
docker rm temp-$IMAGE_NAME

View File

@@ -103,7 +103,7 @@ func main() {
// MY supper tracking
e.Use(tracking.EchoWithConfig(tracking.TrackingConfig{
IgnorePaths: []string{"/tracking", "/metrics", "/css/*", "/js/*", "/boxes/ws"},
IgnorePaths: []string{"/tracking", "/metrics", "/css/*", "/js/*", "/boxes/ws", "*favicon*"},
IgnoreUserAgents: []string{"*Prometheus*", "*UptimeRobot*"},
}))
trackingGroup := e.Group("/tracking")

View File

@@ -77,7 +77,7 @@ func BasicTrackingHandler(c echo.Context) error {
UniqueVisitors: ts.GetUniqueVisitors(),
TodayVisits: ts.GetTodayVisits(),
ActiveSessions: ts.GetActiveSessions(),
RecentVisits: ts.GetRecentVisits(20),
RecentVisits: ts.GetRecentVisits(50),
TopPages: ts.GetTopPages(5),
}