mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[PR #1550] [MERGED] Nginx duplicate includes #8469
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#8469
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?
📋 Pull Request Information
Original PR: https://github.com/0xJacky/nginx-ui/pull/1550
Author: @0xJacky
Created: 2/7/2026
Status: ✅ Merged
Merged: 2/8/2026
Merged by: @0xJacky
Base:
dev← Head:cursor/nginx-duplicate-includes-285a📝 Commits (3)
8b543fefix: prevent duplicate include directives in nginx.conf7572865fix: align Fix function patterns with Check functions and defer backup creation9b76c1aFix: Add backup creation for fallback paths in nginx.conf fix functions📊 Changes
2 files changed (+121 additions, -21 deletions)
View changed files
📝
internal/self_check/nginx_conf.go(+69 -21)📝
internal/self_check/nginx_conf_test.go(+52 -0)📄 Description
Prevent duplicate include directives in
nginx.confby making fix functions idempotent.The
FixNginxConfIncludeSites,FixNginxConfIncludeStreams, andFixNginxConfIncludeConfDfunctions previously appended include directives without checking for existing ones, leading to duplicate entries innginx.confif called multiple times. This change adds a check to each function to ensure an include directive is only added if it doesn't already exist.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.