INNER CODE UNIT · Python

after_request

philippemerle/KubeDiagrams · webapp/backend/app.py:72

    def after_request(response):
        """Log request in Apache Combined Log Format."""
        # Skip logging for health checks to avoid log spam
        if request.path == '/api/health':
            return response

        # Get response size
        response_size = response.calculate_content_length() or 0

        # Log the request
        log_request(
            status_code=response.status_code,
            response_size=response_size
        )

        return response

    # Blueprints registration

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…