pkulchenko / fullmoon

Fast and minimalistic Redbean-based Lua web framework in one file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Suggestion] Disable Listing

evandrodacs opened this issue · comments

Hello,

Would it be possible to put in fullmoon a way to disable root listing (redbean default) without the need to create an index file?

e.g.
When the listing is deactivated
A blank or 404, default route to / is created if the user has not defined

Are you saying that you may not have any routes for / and the listing is displayed by default? Do you have any other routes or is this some configuration without any routes?

I'd rather consider doing the opposite: the listing is disabled by default, but you can enable it with a specific route (as desired).

Correct, listing is disabled by default and only activated if the user wants

I don't get any listing by default from the following code:

local fm = require"fullmoon"
fm.run()

I get 404 when accessing root URL /; isn't that what you'd expect?

Oh great! This what I expected. Thanks for support!