diff options
author | Aaron Parecki <aaron@parecki.com> | 2016-04-21 07:48:16 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2016-04-21 07:48:16 -0700 |
commit | 904782f973a12542cacb394e2e1d0827accd995a (patch) | |
tree | 66f5ef63678ba61f9cfdc69cc6682bc51a57c05b /controllers/editor.php | |
parent | d0055bad24153e1dc696df2b8825dba4c523b434 (diff) |
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
Diffstat (limited to 'controllers/editor.php')
-rw-r--r-- | controllers/editor.php | 14 |
1 files changed, 4 insertions, 10 deletions
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 @@ <?php $app->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); -}); |