diff --git a/cmd/server/nginx_conf/website_default.conf b/cmd/server/nginx_conf/website_default.conf
index 6ff2badb9..c6ffb7e8c 100644
--- a/cmd/server/nginx_conf/website_default.conf
+++ b/cmd/server/nginx_conf/website_default.conf
@@ -9,7 +9,7 @@ server {
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Upgrade $http_upgrade;`
proxy_set_header Connection "upgrade";
@@ -18,13 +18,17 @@ server {
access_by_lua_file /www/common/waf/access.lua;
set $RulePath /www/sites/domain/waf/rules;
set $logdir /www/sites/domain/waf/log;
+ set $redirect on;
+ set $attackLog on;
set $CCDeny on;
- set $attacklog on;
- set $whiteModule on;
- set $getMatch on;
- set $cookieMatch on;
- set $postMatch on;
- set $Redirect on;
+ set $urlWhiteAllow on;
+ set $urlBlockDeny on;
+ set $argsDeny on;
+ set $postDeny on;
+ set $cookieDeny on;
+ set $fileExtDeny on;
+ set $ipBlockDeny on;
+ set $ipWhiteAllow on;
location ~ /.well-known/acme-challenge {
diff --git a/frontend/src/views/website/website/config/safety/file-block-list/index.vue b/frontend/src/views/website/website/config/safety/file-block-list/index.vue
index f0ca4d8a4..b44b289be 100644
--- a/frontend/src/views/website/website/config/safety/file-block-list/index.vue
+++ b/frontend/src/views/website/website/config/safety/file-block-list/index.vue
@@ -1,6 +1,9 @@
+
+
+
@@ -35,7 +38,7 @@
diff --git a/frontend/src/views/website/website/config/safety/index.vue b/frontend/src/views/website/website/config/safety/index.vue
index 6c250ce47..31dc8234f 100644
--- a/frontend/src/views/website/website/config/safety/index.vue
+++ b/frontend/src/views/website/website/config/safety/index.vue
@@ -4,28 +4,43 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
diff --git a/frontend/src/views/website/website/config/safety/ip-list/index.vue b/frontend/src/views/website/website/config/safety/ip-list/index.vue
index d7eddeab2..a15ac0098 100644
--- a/frontend/src/views/website/website/config/safety/ip-list/index.vue
+++ b/frontend/src/views/website/website/config/safety/ip-list/index.vue
@@ -1,6 +1,9 @@
+
+
+
@@ -35,7 +38,7 @@
diff --git a/frontend/src/views/website/website/config/safety/value-list/index.vue b/frontend/src/views/website/website/config/safety/value-list/index.vue
index 11a36e747..0667eda3b 100644
--- a/frontend/src/views/website/website/config/safety/value-list/index.vue
+++ b/frontend/src/views/website/website/config/safety/value-list/index.vue
@@ -59,6 +59,10 @@ const props = defineProps({
type: String,
default: 'url',
},
+ paramKey: {
+ type: String,
+ default: 'url',
+ },
});
const id = computed(() => {
return props.id;
@@ -66,6 +70,9 @@ const id = computed(() => {
const rule = computed(() => {
return props.rule;
});
+const key = computed(() => {
+ return props.paramKey;
+});
let loading = ref(false);
let data = ref([]);
@@ -141,25 +148,12 @@ const submit = async () => {
});
};
-const getKey = (rule: string) => {
- switch (rule) {
- case 'url':
- return '$UrlDeny';
- case 'whiteurl':
- return '$whiteModule';
- case 'post':
- return '$postMatch';
- case 'url':
- return '$UrlDeny';
- case 'url':
- return '$UrlDeny';
- }
-};
-
onMounted(() => {
req.value.websiteId = id.value;
req.value.rule = rule.value;
- enableUpdate.value.key = getKey(rule.value);
+ req.value.key = key.value;
+ enableUpdate.value.key = key.value;
+ enableUpdate.value.websiteId = id.value;
get();
});