More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Repair Redirect, Proxy & Routing Failures

    1

    Repair Redirect, Proxy & Routing Failures is a bounded ToolForge Labs workflow.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Redirect, Proxy & Routing Failures

    Repair Redirect, Proxy & Routing Failures

    Example session with this skill installed

    Our Next.js app is behind an Nginx proxy. Requests to /dashboard are looping with 301s. It seems like the app thinks it is on HTTP while Nginx is handling SSL. Fix the middleware and Nginx config.

    • Read your context and instructions
    • Compiled the repair redirect proxy

    I have analyzed the Nginx configuration and the Next.js middleware. The redirect loop is caused by the application failing to recognize the X-Forwarded-Proto header, leading it to attempt a redirect to HTTPS which the proxy then terminates and passes back as HTTP.

    Proxy and Middleware Repair

    
    # Updated Nginx Location Block
    location / {
        proxy_pass http://nextjs_upstream;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        
        # Ensure these headers are explicitly set for the application
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    
    // middleware.ts or next.config.js Trust Logic
    // Ensure the application trusts the proxy headers to determine the protocol
    export function middleware(request) {
      const proto = request.headers.get('x-forwarded-proto');
      const host = request.headers.get('host');
      
      // Logic to prevent internal loops
      if (proto === 'http' && process.env.NODE_ENV === 'production') {
        return NextResponse.redirect(`https://${host}${request.nextUrl.pathname}`, 301);
      }
    }
    
    ComponentInvariantRepair Action
    NginxMust pass $scheme to X-Forwarded-ProtoAdded explicit header propagation in location block.
    Next.jsMust respect X-Forwarded-Proto for SSL detectionUpdated middleware to check headers before issuing 301.
    Trust BoundaryApplication must trust Nginx IP rangeVerified trust is restricted to the local VPC subnet.

    Next steps

    1. Apply the Nginx configuration changes and reload the service using nginx -s reload.
    2. Deploy the updated middleware to your staging environment.
    3. Verify the fix by running curl -I -H "X-Forwarded-Proto: http" https://yourdomain.com/dashboard to ensure only one redirect occurs.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Repair Redirect, Proxy & Routing Failures is a bounded ToolForge Labs workflow. Repair reverse-proxy, redirect, forwarded-host/protocol/path, route-prefix, canonical URL, and proxy-trust failures. Works from repositories or partial configs/logs. Produces bounded repairs and deterministic tests while preserving authentication, trusted-proxy policy, tenant routing, path protections, and documented external URLs. It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Cannot verify production systems, external services, or facts that are not present in supplied evidence. With partial context it returns bounded diagnosis/review, explicit assumptions, and a deterministic validation plan rather than claiming successful execution.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Use a clean branch or a controlled review workspace. Supply repository files, logs, traces, configuration, or evidence needed for the task. Review all patches/findings before merge or operational action; keep production credentials and destructive production actions out of the workflow.

    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill resolves complex routing issues like infinite redirect loops, incorrect X-Forwarded-Proto headers, broken canonical URLs, and proxy-trust failures that compromise security or tenant isolation.

    Yes, it can analyze and provide repair steps based on partial evidence such as Nginx/HAProxy logs, configuration snippets, error traces, or architecture diagrams if a full repository is unavailable.

    The skill is designed to be compatible with most major AI agents and developer platforms that support external tool integration or custom workflows.

    Unlike general AI, this workflow produces bounded repairs with deterministic tests to ensure that authentication policies, trusted-proxy headers, and path protections remain intact.

    You receive the full Repair Redirect, Proxy & Routing Failures workflow, including the logic for diagnosing misconfigurations and generating verifiable repair steps.

    The skill generates concrete repair actions paired with focused validation steps or traceable evidence, allowing you to verify the fix works as intended before deployment.

    New in APIs & Backend