This website requires JavaScript.
Explore
Help
Sign In
luna
/
kemal
Watch
1
Star
0
Fork
You've already forked kemal
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
5c97942707
kemal
/
src
/
kemal
/
macros.cr
5 lines
104 B
Crystal
Raw
Normal View
History
Unescape
Escape
Removed env from redirect and changed redirect from method to macro. Removed `env.redirect` in-favor of `redirect` in-order to make Kemal's API look more like Sinatra. Thanks @sdogruyol and @f for introducing me to macros :-). Binding HTTP::Server to 0.0.0.0
2015-12-09 19:37:23 +00:00
macro
redirect
(
url
)
env
.
response
.
headers
.
add
"
Location
"
,
{{
url
}}
env
.
response
.
status_code
=
301
Refactor static file handler
2015-12-10 19:15:28 +00:00
end