diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-05-20 22:42:43 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-05-20 22:42:43 -0400 |
commit | 3a6e1f52d920390041fdb0b1991546f61bc1a8ba (patch) | |
tree | 29e9479f144819ee137f147935ee76f1eb039c9d /src/guff.cr | |
parent | 406300af9a0264ce149ec63f2a06085385f85f2e (diff) | |
download | guff-3a6e1f52d920390041fdb0b1991546f61bc1a8ba.tar.bz2 guff-3a6e1f52d920390041fdb0b1991546f61bc1a8ba.zip |
make assets accessible when unauthed, populate login page
Diffstat (limited to 'src/guff.cr')
-rw-r--r-- | src/guff.cr | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/guff.cr b/src/guff.cr index 2468c25..70bbc71 100644 --- a/src/guff.cr +++ b/src/guff.cr @@ -242,13 +242,14 @@ module Guff end end - class AssetsHandler < AuthenticatedHandler + # TODO: check referrer, add x-frame-options + class AssetsHandler < Handler def initialize(context : Context) - super(context, %w{admin editor}) + super(context) @etags = {} of String => String end - def authenticated_call(context : HTTP::Server::Context) + def call(context : HTTP::Server::Context) req_path = context.request.path.not_nil! if matching_request?(context.request.method, req_path) |