From fa4d2bd9b5a94200d32b01c07d75f377ca640955 Mon Sep 17 00:00:00 2001 From: Mike Levin Date: Thu, 5 Mar 2026 00:27:35 -0500 Subject: [PATCH] Injected AI-driven Nginx map include and execution logic --- remotes/honeybot/nixos/configuration.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/remotes/honeybot/nixos/configuration.nix b/remotes/honeybot/nixos/configuration.nix index 3d1e2818..92bf0523 100644 --- a/remotes/honeybot/nixos/configuration.nix +++ b/remotes/honeybot/nixos/configuration.nix @@ -205,6 +205,10 @@ # 1. THE SENSOR: Read the Accept header and define the MIME type appendHttpConfig = '' + # --- THE MAP: Load the AI-generated routing table --- + include /home/mike/www/mikelev.in/_site/redirects.map*; + # ---------------------------------------------------- + map $http_accept $serve_markdown { default 0; "~*text/markdown" 1; @@ -225,6 +229,12 @@ locations."/" = { extraConfig = '' add_header Vary "Accept" always; # <--- The final polish + + # --- THE SWITCH: Execute the 301 Redirect if mapped --- + if ($new_uri != "") { + return 301 $new_uri; + } + # ------------------------------------------------------ if ($serve_markdown = 1) { rewrite ^(.*)/$ $1/index.md break; }