From 904782f973a12542cacb394e2e1d0827accd995a Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Thu, 21 Apr 2016 07:48:16 -0700 Subject: move editor folder to editor-files, remove appcache * it sometimes confuses web servers to have a folder named "editor" while also serving routes with the same name * dropped appcache stuff since it wasn't working super well * add nginx config to the readme --- controllers/editor.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'controllers') diff --git a/controllers/editor.php b/controllers/editor.php index 4c9740b..a3c0496 100644 --- a/controllers/editor.php +++ b/controllers/editor.php @@ -1,9 +1,10 @@ get('/editor', function() use($app) { - // Don't require login because appcache caches the whole page - $html = $app->render('editor.php'); - $app->response()->body($html); + if($user=require_login($app)) { + $html = $app->render('editor.php'); + $app->response()->body($html); + } }); $app->post('/editor/publish', function() use($app) { @@ -66,10 +67,3 @@ $app->post('/editor/test-login', function() use($app) { $app->response()['Content-type'] = 'application/json'; $app->response()->body(json_encode(['logged_in'=>$logged_in])); }); - -$app->get('/appcache.manifest', function() use($app) { - $content = partial('partials/appcache'); - - $app->response()['Content-type'] = 'text/cache-manifest'; - $app->response()->body($content); -}); -- cgit v1.2.3