aboutsummaryrefslogtreecommitdiff
path: root/src/guff/handler.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/handler.cr')
-rw-r--r--src/guff/handler.cr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/guff/handler.cr b/src/guff/handler.cr
index ce225eb..357ed1f 100644
--- a/src/guff/handler.cr
+++ b/src/guff/handler.cr
@@ -11,5 +11,10 @@ module Guff
# do nothing by default
call_next(context)
end
+
+ private def redirect(context, url : String)
+ context.response.status_code = 302
+ context.response.headers["location"] = url
+ end
end
end