From 40b67993e537d77f93957943cd6b61138554ec87 Mon Sep 17 00:00:00 2001 From: mtgmonkey Date: Fri, 6 Jun 2025 12:57:50 -0400 Subject: [PATCH] Onion-Location header added --- src/Main.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index d9611cf..9f06228 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -101,10 +101,14 @@ serverErrorReadFile e = H.toHtml $ "document.getElementById('body').innerHTML='S ++ "';" shortCache :: ActionM () -shortCache = addHeader "Cache-Control" "max-age=21600" +shortCache = do + addHeader "Cache-Control" "max-age=21600" + addHeader "Onion-Location" "http://mmonkydr7laya5lsrtb4csa5tqlna62cj5qpjuvy726ti4xb3vznneid.onion" noCache :: ActionM () -noCache = addHeader "Cache-Control" "no-cache" +noCache = do + addHeader "Cache-Control" "no-cache" + addHeader "Onion-Location" "http://mmonkydr7laya5lsrtb4csa5tqlna62cj5qpjuvy726ti4xb3vznneid.onion" embedJs :: Js -> H.Html embedJs js = H.script $ js