mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 19:05:55 +02:00
fix: abort only when log level higher than warn
This commit is contained in:
parent
e38380aac0
commit
509d059ceb
3 changed files with 402 additions and 402 deletions
|
@ -1 +1 @@
|
||||||
{"version":"1.9.9","build_id":133,"total_build":203}
|
{"version":"1.9.9","build_id":134,"total_build":204}
|
|
@ -1 +1 @@
|
||||||
{"version":"1.9.9","build_id":133,"total_build":203}
|
{"version":"1.9.9","build_id":134,"total_build":204}
|
|
@ -316,7 +316,7 @@ func EnableDomain(c *gin.Context) {
|
||||||
// Test nginx config, if not pass then disable the site.
|
// Test nginx config, if not pass then disable the site.
|
||||||
output := nginx.TestConf()
|
output := nginx.TestConf()
|
||||||
|
|
||||||
if nginx.GetLogLevel(output) >= nginx.Warn {
|
if nginx.GetLogLevel(output) > nginx.Warn {
|
||||||
_ = os.Remove(enabledConfigFilePath)
|
_ = os.Remove(enabledConfigFilePath)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{
|
c.JSON(http.StatusInternalServerError, gin.H{
|
||||||
"message": output,
|
"message": output,
|
||||||
|
@ -326,7 +326,7 @@ func EnableDomain(c *gin.Context) {
|
||||||
|
|
||||||
output = nginx.Reload()
|
output = nginx.Reload()
|
||||||
|
|
||||||
if nginx.GetLogLevel(output) >= nginx.Warn {
|
if nginx.GetLogLevel(output) > nginx.Warn {
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{
|
c.JSON(http.StatusInternalServerError, gin.H{
|
||||||
"message": output,
|
"message": output,
|
||||||
})
|
})
|
||||||
|
@ -365,7 +365,7 @@ func DisableDomain(c *gin.Context) {
|
||||||
|
|
||||||
output := nginx.Reload()
|
output := nginx.Reload()
|
||||||
|
|
||||||
if nginx.GetLogLevel(output) >= nginx.Warn {
|
if nginx.GetLogLevel(output) > nginx.Warn {
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{
|
c.JSON(http.StatusInternalServerError, gin.H{
|
||||||
"message": output,
|
"message": output,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue