From 3a6e1f52d920390041fdb0b1991546f61bc1a8ba Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 20 May 2016 22:42:43 -0400 Subject: make assets accessible when unauthed, populate login page --- src/guff.cr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/guff.cr') 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) -- cgit v1.2.3