From f3cbdd8076a747f340bafb79b33b6858d5782e85 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 13 Apr 2026 12:20:18 +0200 Subject: [PATCH] fix(ci): remove redundant robots-test diagnostic route and check --- .gitea/workflows/deploy.yml | 8 -------- apps/web/src/middleware.ts | 5 ----- docker-compose.yml | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e14b3a7..f600998 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -485,14 +485,6 @@ jobs: run: | BASE_URL="${{ needs.prepare.outputs.next_public_url }}" - echo "Verifying diagnostic rewrite..." - STATUS=$(curl -s -L -o /dev/null -w "%{http_code}" "$BASE_URL/robots-test") - if [ "$STATUS" != "200" ]; then - echo "❌ Diagnostic rewrite /robots-test failed! (Status: $STATUS)" - exit 1 - fi - echo "✅ Diagnostic rewrite OK" - echo "Verifying case study page..." STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL/case-studies/klz-cables") if [ "$STATUS" != "200" ]; then diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts index 9a3e722..7140e3a 100644 --- a/apps/web/src/middleware.ts +++ b/apps/web/src/middleware.ts @@ -9,10 +9,6 @@ import type { NextRequest } from 'next/server'; export function middleware(request: NextRequest) { const { pathname } = request.nextUrl; - // 1. Diagnostic Rewrite - if (pathname === '/robots-test') { - return NextResponse.rewrite(new URL('/robots.txt', request.url)); - } // 2. Legacy Showcase Asset Mapping // Matches: /wp-content/*, /wp-includes/*, /assets/*, and their relative subpaths @@ -36,7 +32,6 @@ export function middleware(request: NextRequest) { // Optimization: Only run middleware for legacy asset paths to minimize overhead export const config = { matcher: [ - '/robots-test', '/wp-content/:path*', '/wp-includes/:path*', '/assets/:path*', diff --git a/docker-compose.yml b/docker-compose.yml index e024b32..d4329dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: - "caddy.reverse_proxy={{upstreams 3000}}" # Public Router (Whitelist for OG Images, Sitemaps, Health) - - 'traefik.http.routers.${PROJECT_NAME}-public.rule=(${TRAEFIK_HOST_RULE:-Host("${TRAEFIK_HOST:-mintel.localhost}")}) && (PathPrefix("/health") || PathPrefix("/api/health") || PathPrefix("/sitemap.xml") || PathPrefix("/robots.txt") || PathPrefix("/robots-test") || PathPrefix("/manifest.webmanifest") || PathPrefix("/api/og") || PathPrefix("/assets") || PathPrefix("/wp-content") || PathPrefix("/wp-includes") || PathPrefix("/showcase") || PathRegexp(".*opengraph-image.*") || PathRegexp(".*sitemap.*"))' + - 'traefik.http.routers.${PROJECT_NAME}-public.rule=(${TRAEFIK_HOST_RULE:-Host("${TRAEFIK_HOST:-mintel.localhost}")}) && (PathPrefix("/health") || PathPrefix("/api/health") || PathPrefix("/sitemap.xml") || PathPrefix("/robots.txt") || PathPrefix("/manifest.webmanifest") || PathPrefix("/api/og") || PathPrefix("/assets") || PathPrefix("/wp-content") || PathPrefix("/wp-includes") || PathPrefix("/showcase") || PathRegexp(".*opengraph-image.*") || PathRegexp(".*sitemap.*"))' - "traefik.http.routers.${PROJECT_NAME}-public.entrypoints=${TRAEFIK_ENTRYPOINT:-web}" - "traefik.http.routers.${PROJECT_NAME}-public.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-}" - "traefik.http.routers.${PROJECT_NAME}-public.tls=${TRAEFIK_TLS:-false}"