db03d5713d6ba3562a49b1323c0cbf4beaa0846b
🚀 Core Features: - Complete database-persisted redirect tracking system - Enhanced hop analysis with timing, headers, and metadata - Intelligent redirect type detection (301, 302, 307, 308, meta, JS, final) - Automatic redirect loop detection and prevention - Comprehensive status tracking (OK, ERROR, TIMEOUT, LOOP) - Real-time latency measurement per hop 🔧 Technical Implementation: - Production-grade RedirectTrackerService with Prisma integration - Type-safe request/response handling with Zod validation - Advanced rate limiting (200/hour authenticated, 50/hour anonymous) - Flexible authentication (optional auth for broader access) - Robust error handling and structured logging - Comprehensive input validation and sanitization 🌐 API Endpoints: - POST /api/v2/track - Enhanced tracking with database persistence - GET /api/v2/track/:checkId - Retrieve specific check with full hop details - GET /api/v2/projects/:projectId/checks - List project checks with pagination - GET /api/v2/checks/recent - Recent checks for authenticated users - POST /api/v2/track/bulk - Placeholder for Phase 6 bulk processing 📊 Enhanced Data Model: - Persistent check records with complete metadata - Detailed hop tracking with response headers and timing - SSL scheme detection and protocol analysis - Content-Type extraction and analysis - Comprehensive redirect chain preservation 🔒 Security & Performance: - User-based rate limiting for authenticated requests - IP-based rate limiting for anonymous requests - Configurable timeouts and hop limits (1-20 hops, 1-30s timeout) - Request validation prevents malicious input - Structured error responses for API consistency 🔄 Backward Compatibility: - All existing endpoints preserved and functional - Legacy response formats maintained exactly - Zero breaking changes to existing integrations - Enhanced features available only in v2 endpoints 📋 Database Schema: - Checks table for persistent tracking records - Hops table for detailed redirect chain analysis - Foreign key relationships for data integrity - Optimized indexes for performance queries 🧪 Quality Assurance: - Comprehensive test suite for all endpoints - Authentication flow testing - Rate limiting verification - Error handling validation - Legacy compatibility verification Ready for Phase 3: SSL/SEO/Security analysis integration
URL Redirect Tracker
A simple web application that tracks all intermediate redirects from an input URL to the final landing page.
Features
- Tracks all redirects from the initial URL to the final destination
- Displays the time in milliseconds for each redirect
- Marks non-SSL (non-HTTPS) redirects with red
- Shows a complete redirect chain with timing information
Installation
- Clone this repository
- Install dependencies:
npm install - Start the server:
npm start - Open your browser and navigate to
http://localhost:3333
How to Use
- Enter a URL in the input field (e.g.,
http://example.comorexample.com) - Click the "Track Redirects" button
- View the complete redirect chain, including timing information
- Non-SSL (HTTP) redirects will be marked in red
Technical Details
- Built with Node.js and Express
- Uses Axios for making HTTP requests and following redirects
- Frontend built with vanilla JavaScript, HTML, and CSS
- Server runs on port 3333
License
MIT
Description
Languages
TypeScript
71.6%
JavaScript
18.2%
Handlebars
3.1%
Shell
2.8%
CSS
1.9%
Other
2.4%