Skip to content

Commit bac73f2

Browse files
committed
fix: stream is closed before call_next
1 parent d7a4ce2 commit bac73f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/controllers/link.cr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ module App::Controllers::Link
4646
end
4747
end
4848

49-
env.redirect link.url!, 301
49+
env.response.status_code = 301
50+
env.response.headers["Location"] = link.url!
51+
env.response.headers["Content-Type"] = "text/html"
52+
env.response.print("Redirecting...")
5053
end
5154
end
5255

0 commit comments

Comments
 (0)