aboutsummaryrefslogtreecommitdiff
path: root/lazybones.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2020-12-14 08:54:22 -0600
committerColin Okay <okay@toyful.space>2020-12-14 08:54:22 -0600
commitb7c6f7e5f5397026a6ecc1ffc2aa7d0b82d58816 (patch)
tree8e9c63e4ba6ccdf861621cfeb943f2d7ad6f8a70 /lazybones.lisp
parentdda6f74b58d7d410d186f71dedefcd0747a63bf9 (diff)
added http-redirect
Diffstat (limited to 'lazybones.lisp')
-rw-r--r--lazybones.lisp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lazybones.lisp b/lazybones.lisp
index b95b73b..855f2d1 100644
--- a/lazybones.lisp
+++ b/lazybones.lisp
@@ -148,6 +148,11 @@ where #HANDERL123 is a block label unique to the handler.
*resp-headers*)
content))
+(defun http-redirect (location)
+ (list 303 (list* :location location
+ *resp-headers*)
+ nil))
+
(defun serve-directory (root-path root-dir &key headers cache-p (filter #'identity))
"Adds handlers for every file in the directory tree with the root ROOT-DIR.