Skip to content

Commit

Permalink
feat: remove enableWaf field (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
love98ooo authored Aug 3, 2024
1 parent 34b2278 commit f5aae96
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion object/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ type Site struct {
Domain string `xorm:"varchar(100)" json:"domain"`
OtherDomains []string `xorm:"varchar(500)" json:"otherDomains"`
NeedRedirect bool `json:"needRedirect"`
EnableWaf bool `json:"enableWaf"`
DisableVerbose bool `json:"disableVerbose"`
Rules []string `xorm:"varchar(500)" json:"wafRuleIds"`
Challenges []string `xorm:"mediumtext" json:"challenges"`
Expand Down
10 changes: 0 additions & 10 deletions web/src/SiteEditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,6 @@ class SiteEditPage extends React.Component {
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={2}>
{i18next.t("site:Enable WAF")}:
</Col>
<Col span={1} >
<Switch checked={this.state.site.enableWaf} onChange={checked => {
this.updateSiteField("enableWaf", checked);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={2}>
{i18next.t("site:Disable verbose")}:
Expand Down
17 changes: 0 additions & 17 deletions web/src/SiteListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class SiteListPage extends BaseListPage {
displayName: `New Site - ${randomName}`,
domain: "door.casdoor.com",
otherDomains: [],
enableWaf: false,
needRedirect: false,
challenges: [],
host: "",
Expand Down Expand Up @@ -180,22 +179,6 @@ class SiteListPage extends BaseListPage {
});
},
},
{
title: i18next.t("site:Enable WAF"),
dataIndex: "enableWaf",
key: "enableWaf",
width: "120px",
sorter: (a, b) => a.otherDomains.localeCompare(b.otherDomains),
render: (text, record, index) => {
return (
<a key={text} target="_blank" rel="noreferrer">
<Tag color={!record.enableWaf ? "default" : "processing"}>
{record.enableWaf ? "enabled" : "disabled"}
</Tag>
</a>
);
},
},
{
title: i18next.t("site:Host"),
dataIndex: "host",
Expand Down

0 comments on commit f5aae96

Please sign in to comment.