From d6d22f2c1f10cb19b3976a76d78c20349bb95f76 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 4 Feb 2014 23:13:48 +0100 Subject: Added lazy load to image page. --- fbin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fbin.py') diff --git a/fbin.py b/fbin.py index 4a94e97..b5dabd2 100755 --- a/fbin.py +++ b/fbin.py @@ -143,7 +143,7 @@ class Application(object): return files def validate_cookie(self, cookie): - if not cookie: + if not cookie or not 'identifier' in cookie: return None identifier = cookie['identifier'].value @@ -501,7 +501,7 @@ class Application(object): def static(self, environ, start_response, path): filename = path[1] - if not filename in ('style.css', 'no-thumbnail.png', 'favicon.ico'): + if not filename in ('style.css', 'no-thumbnail.png', 'favicon.ico', 'jquery-2.1.0.min.js', 'jquery.lazyload.min.js'): start_response('404 Not Found', []) return [] @@ -678,3 +678,5 @@ if __name__ == '__main__': WSGIServer.address_family |= 10 http = make_server('', 8000, Application()) http.serve_forever() + +# vim: noet ts=4 -- cgit v1.2.3