You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When NGINX encounters an include foo/* directive, it does NOT include hidden files in the globbed match.
However, a *(github.com/tufanbarisyildirim/gonginx/parser.Parser).Parse() with a parser.Optiion of parser.WithIncludeParsing()does include hidden files if that include directive uses wildcards/globs.
This has led to a particularly confusing bug for us, as nginx -t validates but the parsing would fail consistently. :)
If include parsing is enabled, I'd filter the globbed list and filter each item out of it matches an if strings.HasPrefix(filepath.Base(fname), ".") (where fname is the filename/filepath, and filepath is stdlib's path/filepath).
The text was updated successfully, but these errors were encountered:
When NGINX encounters an
include foo/*
directive, it does NOT include hidden files in the globbed match.However, a
*(github.com/tufanbarisyildirim/gonginx/parser.Parser).Parse()
with a parser.Optiion ofparser.WithIncludeParsing()
does include hidden files if thatinclude
directive uses wildcards/globs.This has led to a particularly confusing bug for us, as
nginx -t
validates but the parsing would fail consistently. :)If include parsing is enabled, I'd filter the globbed list and filter each item out of it matches an
if strings.HasPrefix(filepath.Base(fname), ".")
(wherefname
is the filename/filepath, andfilepath
is stdlib'spath/filepath
).The text was updated successfully, but these errors were encountered: