mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat(site): implement site status management and update related components
This commit is contained in:
parent
402de5d987
commit
502b656bc5
12 changed files with 93 additions and 99 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/tufanbarisyildirim/gonginx/config"
|
||||
"github.com/tufanbarisyildirim/gonginx/dumper"
|
||||
"github.com/tufanbarisyildirim/gonginx/parser"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
)
|
||||
|
||||
type ProxyCacheConfig struct {
|
||||
|
@ -189,7 +190,10 @@ func updateOrRemoveProxyCachePath(block config.IBlock, directives []config.IDire
|
|||
// First parameter is the path (required)
|
||||
if proxyCache.Path != "" {
|
||||
params = append(params, config.Parameter{Value: proxyCache.Path})
|
||||
_ = os.MkdirAll(proxyCache.Path, 0755)
|
||||
err := os.MkdirAll(proxyCache.Path, 0755)
|
||||
if err != nil {
|
||||
logger.Error("failed to create proxy cache path", err)
|
||||
}
|
||||
} else {
|
||||
// No path specified, can't add the directive
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue