mirror of
https://github.com/tufanbarisyildirim/gonginx.git
synced 2026-04-27 00:35:51 +03:00
[GH-ISSUE #64] Non-parity wildcard/globbing behavior on include #30
Labels
No labels
bug
enhancement
good first issue
pull-request
question
v2
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gonginx#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nf-brentsaner on GitHub (Feb 11, 2025).
Original GitHub issue: https://github.com/tufanbarisyildirim/gonginx/issues/64
Originally assigned to: @tufanbarisyildirim on GitHub.
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 thatincludedirective uses wildcards/globs.This has led to a particularly confusing bug for us, as
nginx -tvalidates 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), ".")(wherefnameis the filename/filepath, andfilepathis stdlib'spath/filepath).@tufanbarisyildirim commented on GitHub (Mar 16, 2025):
Thanks for reporting this @nf-brentsaner would you like to create a PR to fix?
@nf-brentsaner commented on GitHub (Mar 18, 2025):
@tufanbarisyildirim I'll try to fit it in but it may be some time before I can! It obviously shouldn't take too long for me to do once I can devote time on it since I've already identified the how/where/why.
@nf-brentsaner commented on GitHub (Mar 18, 2025):
As per #67 shown above, PR in!
@tufanbarisyildirim commented on GitHub (Feb 20, 2026):
Implemented in #76 (include glob wildcard now skips hidden files to match nginx behavior, with regression tests).