Skip to content

Commit eb4b50b

Browse files
authored
Merge pull request #150 from ksymph/master
fix: prevent file serving when location is empty
2 parents c0e9b4d + 11db1fc commit eb4b50b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pegasus/handler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Handler:new(callback, location, plugins, logger)
1111
handler.callback = callback
1212
handler.plugins = plugins or {}
1313

14-
if location then
14+
if location ~= '' then
1515
handler.plugins[#handler.plugins+1] = Files:new {
1616
location = location,
1717
default = "/index.html",

0 commit comments

Comments
 (0)