chore: proxy res icon
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package installcmd
|
package installcmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"yizhisec.com/hsv2/forge/internal/controller/installer"
|
"yizhisec.com/hsv2/forge/internal/controller/installer"
|
||||||
)
|
)
|
||||||
@@ -18,6 +20,17 @@ func Check() *cobra.Command {
|
|||||||
Use: "check",
|
Use: "check",
|
||||||
Short: "Check system requirements",
|
Short: "Check system requirements",
|
||||||
Long: `Check system requirements for the project.`,
|
Long: `Check system requirements for the project.`,
|
||||||
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
|
if os.Getenv("FORGE_NO_CHECK_DISK") == "true" {
|
||||||
|
ignoreDisk = true
|
||||||
|
}
|
||||||
|
if os.Getenv("FORGE_NO_CHECK_MEMORY") == "true" {
|
||||||
|
ignoreMemory = true
|
||||||
|
}
|
||||||
|
if os.Getenv("FORGE_NO_CHECK_CPU") == "true" {
|
||||||
|
ignoreCPU = true
|
||||||
|
}
|
||||||
|
},
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
_installer := installer.NewInstaller(workdir, target)
|
_installer := installer.NewInstaller(workdir, target)
|
||||||
return _installer.Check(
|
return _installer.Check(
|
||||||
@@ -31,9 +44,6 @@ func Check() *cobra.Command {
|
|||||||
|
|
||||||
_cmd.Flags().StringVar(&workdir, "workdir", "/root/hs-installation", "Working directory")
|
_cmd.Flags().StringVar(&workdir, "workdir", "/root/hs-installation", "Working directory")
|
||||||
_cmd.Flags().StringVar(&target, "target", "self", "Target")
|
_cmd.Flags().StringVar(&target, "target", "self", "Target")
|
||||||
_cmd.Flags().BoolVar(&ignoreDisk, "ignore-kheck-disk", false, "ignore disk requirement check result")
|
|
||||||
_cmd.Flags().BoolVar(&ignoreMemory, "ignore-check-memory", false, "ignore memory requirement check result")
|
|
||||||
_cmd.Flags().BoolVar(&ignoreCPU, "ignore-check-cpu", false, "ignore cpu requirement check result")
|
|
||||||
|
|
||||||
return _cmd
|
return _cmd
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,8 +102,24 @@ server {
|
|||||||
proxy_pass http://app-helper-service.hsv2/api/v2_2/user/profile/avatar/update;
|
proxy_pass http://app-helper-service.hsv2/api/v2_2/user/profile/avatar/update;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/admin/business-center/network-app/tunnel {
|
# create layer4 resource
|
||||||
proxy_pass http://app-helper-service.hsv2/api/v2_2/interceptor/mie/resource/icon$request_uri;
|
location = /api/admin/business-center/network-app/tunnel {
|
||||||
|
proxy_pass http://app-helper-service.hsv2/api/v2_2/interceptor/mie/resource4/create/icon$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
# update layer4 resource
|
||||||
|
location ~ ^/api/admin/business-center/network-app/tunnel/\d+/info$ {
|
||||||
|
proxy_pass http://app-helper-service.hsv2/api/v2_2/interceptor/mie/resource4/update/icon$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
# create layer7 resource
|
||||||
|
location = /api/admin/strategy/osi-resource {
|
||||||
|
proxy_pass http://app-helper-service.hsv2/api/v2_2/interceptor/mie/resource7/create/icon$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
# update layer7 resource
|
||||||
|
location ~ ^/api/admin/strategy/osi-resource/\d+/info$ {
|
||||||
|
proxy_pass http://app-helper-service.hsv2/api/v2_2/interceptor/mie/resource7/update/icon$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/v2_1/user {
|
location /api/v2_1/user {
|
||||||
|
|||||||
Reference in New Issue
Block a user