From 2525b6c2f45397c80c5cb46dc0f9e1d68a615bea Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 31 Oct 2019 14:43:38 +0100 Subject: small fixes: * --unsafe by default if not --rw * fix inspector --- build/server.moon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/server.moon b/build/server.moon index 152e4e5..fb6dca4 100644 --- a/build/server.moon +++ b/build/server.moon @@ -36,7 +36,7 @@ class Server @flags.rw = opts.host == 'localhost' or opts.host == '127.0.0.1' if @flags.unsafe == nil - @flags.unsafe = opts.host == 'localhost' or opts.host == '127.0.0.1' + @flags.unsafe = not @flags.rw or opts.host == 'localhost' or opts.host == '127.0.0.1' export UNSAFE UNSAFE = @flags.unsafe @@ -173,7 +173,7 @@ class Server -- moon server.moon [FLAGS] [STORE] [host] [port] -- * FLAGS - any of the following: -- --[no-]rw - enable/disable POST?PUT/DELETE operations (default: on if local) --- --[no-]unsafe - enable/disable server-side code execution when writable is on (default: on if local) +-- --[no-]unsafe - enable/disable server-side code execution when writable is on (default: on if local or --no-rw) -- * STORE - see mmm/mmmfs/stores/init.moon:get_store -- * host - interface to bind to (default localhost, set to 0.0.0.0 for public hosting) -- * port - port to serve from, default 8000 -- cgit v1.2.3