]> Sergey Matveev's repositories - godlighty.git/blobdiff - rc/cryptoanarchy.ru.go
Verbose redirects, tiny DRY
[godlighty.git] / rc / cryptoanarchy.ru.go
index 94630daec1e3788c2f6bfdf72d02d0c3a691b7be..81c85d5157a793e8ec037f07d20f76b5b6ccfd56 100644 (file)
@@ -7,13 +7,14 @@ import (
 )
 
 func init() {
-       godlighty.Hosts["www.cryptoanarchy.ru"] = &godlighty.HostCfg{
+       host := "www.cryptoanarchy.ru"
+       godlighty.Hosts[host] = &godlighty.HostCfg{
                Hooks: []godlighty.Hook{
                        func(w http.ResponseWriter, r *http.Request) bool {
-                               http.Redirect(
-                                       w, r,
+                               redirect(
+                                       host, w, r,
                                        "//www.cypherpunks.ru/Manifesto-cryptoanarchist.html",
-                                       http.StatusTemporaryRedirect,
+                                       http.StatusMovedPermanently,
                                )
                                return true
                        },