INNER CODE UNIT · Python

request_entity_too_large

stanfrbd/cyberbro · app.py:334

def request_entity_too_large(_) -> tuple[str, int]:
    """Handle 413 errors."""
    return render_template("413.html"), 413


@app.route("/history")
def history():
    """Render the history page with pagination and search."""
    # Get and validate parameters
    page: int = request.args.get("page", 1, type=int)
    per_page: int = request.args.get("per_page", 20, type=int)
    search_query: str = request.args.get("search", "", type=str).strip()
    search_type: str = request.args.get("search_type", "observable", type=str)
    time_range: str = request.args.get("time_range", "7d", type=str)

    page, per_page, search_type, time_range = validate_history_params(
        page, per_page, search_type, time_range
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…