mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
16 lines
281 B
Crystal
16 lines
281 B
Crystal
require "kemal"
|
|
|
|
class AuthHandler < Kemal::Handler
|
|
exclude ["/login"]
|
|
def call(env)
|
|
return call_next(env) if exclude_match?(env)
|
|
my_cookie = HTTP::Cookie.new(
|
|
name: "Example",
|
|
value: "KemalCR"
|
|
)
|
|
env.response.cookies << my_cookie
|
|
|
|
pp env.request.cookies
|
|
end
|
|
end
|