From 1afaea2d0073816deec321b341ab176eb495a11f Mon Sep 17 00:00:00 2001 From: gru Date: Fri, 29 Aug 2025 23:47:57 +0200 Subject: [PATCH] Update app.py --- app.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app.py b/app.py index c0cd875..9e3d113 100644 --- a/app.py +++ b/app.py @@ -365,24 +365,24 @@ def favicon(): def index(): generated_link = None recent_links = get_recent_links() - url_param = request.args.get("url", config.DEFAULT_SOURCE_URL) + #url_param = request.args.get("url", config.DEFAULT_SOURCE_URL) raw_ip = request.args.get("ip", "127.0.0.1") try: target_ip = validate_ip(raw_ip) except ValueError: target_ip = "127.0.0.1" - if url_param: - try: - normalized = validate_and_normalize_url(unquote(url_param)) - encoded = quote(normalized, safe="") - generated_link = urljoin( - request.host_url, f"convert?url={encoded}&ip={target_ip}" - ) - add_recent_link(normalized, target_ip) - recent_links = get_recent_links() - except Exception as e: - app.logger.error(f"Error processing URL: {str(e)}") + #if url_param: + # try: + # normalized = validate_and_normalize_url(unquote(url_param)) + # encoded = quote(normalized, safe="") + # generated_link = urljoin( + # request.host_url, f"convert?url={encoded}&ip={target_ip}" + # ) + # add_recent_link(normalized, target_ip) + # recent_links = get_recent_links() + # except Exception as e: + # app.logger.error(f"Error processing URL: {str(e)}") try: return render_template(