Commit ·
60251ae
1
Parent(s): 20c1ce7
Domain migration: 301 redirect blind-monkeys.com pages to blindmonkeys.org
Browse files221 unmodified lines222223224225226227221 unmodified lines'/api/ai-visibility',)@app.before_requestdef require_login_globally():path = request.path or '/'221 unmodified lines222223224225226227228229230231232233234235236237238239240241242221 unmodified lines'/api/ai-visibility',)# Domain migration: page requests on the old domain redirect 301 to the# new domain, preserving path and query. API routes stay on the old host so# cron jobs, server-side proxies and the auto-refresh data feeds keep# working during the transition.NEW_DOMAIN = "blindmonkeys.org"OLD_HOSTS = {"blind-monkeys.com", "www.blind-monkeys.com"}@app.before_requestdef redirect_old_domain():host = (request.host or "").split(":")[0].lower()if host in OLD_HOSTS and not (request.path or "").startswith("/api/"):return redirect("https://" + NEW_DOMAIN + request.full_path.rstrip("?"), code=301)@app.before_requestdef require_login_globally():path = request.path or '/'
local_app.py+15