Skip to content

Commit

Permalink
feat(system-security): Add new routes to whitelisted
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 committed Dec 24, 2024
1 parent da73f26 commit 411256f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ quick_start.sh
cmd/server/fileList.txt
.fileList.txt
1Panel.code-workspace

core/.golangci.yml
agent/.golangci.yml
16 changes: 0 additions & 16 deletions agent/app/service/app_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,22 +746,6 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
}
}
}
} else if form.Type == "apps" {
if m, ok := form.Child.(map[string]interface{}); ok {
result := make(map[string]string)
for key, value := range m {
if strVal, ok := value.(string); ok {
result[key] = strVal
}
}
if envKey, ok := result["envKey"]; ok {
serviceName := envs[envKey]
if serviceName != nil {
appInstall, _ := appInstallRepo.GetFirst(appInstallRepo.WithServiceName(serviceName.(string)))
appParam.ShowValue = appInstall.Name
}
}
}
}

params = append(params, appParam)
Expand Down
3 changes: 3 additions & 0 deletions core/constant/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var WebUrlMap = map[string]struct{}{
"/apps/all": {},
"/apps/installed": {},
"/apps/upgrade": {},
"apps/setting": {},

"/containers": {},
"/containers/container": {},
Expand All @@ -55,6 +56,7 @@ var WebUrlMap = map[string]struct{}{
"/containers/compose": {},
"/containers/template": {},
"/containers/setting": {},
"containers/dashboard": {},

"/cronjobs": {},

Expand Down Expand Up @@ -133,6 +135,7 @@ var WebUrlMap = map[string]struct{}{
"/xpack/alert/setting": {},
"/xpack/setting": {},
"xpack/node": {},
"xpack/waf/stat": {},
}

var DynamicRoutes = []string{
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/styles/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ html {

.input-help {
font-size: 12px;
word-break: break-all;
color: #8f959e;
word-break: keep-all;
color: #adb0bc;
width: 100%;
display: inline-block;
height: 12px;
white-space: normal;
}

.input-error {
Expand Down Expand Up @@ -431,7 +431,7 @@ html {
cursor: pointer;
}

.dialog-footer{
.dialog-footer {
display: flex;
align-items: center;
justify-content: flex-end;
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/views/website/website/create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@
<el-option label="Node.js" value="node"></el-option>
<el-option label="Java" value="java"></el-option>
<el-option label="Go" value="go"></el-option>
<el-option label="Python" value="python"></el-option>
<el-option label=".NET" value="dotnet"></el-option>
</el-select>
</el-form-item>
</el-col>
Expand Down

0 comments on commit 411256f

Please sign in to comment.