Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove enableWaf field #51

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading