Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
b56b4505
Commit
b56b4505
authored
Apr 17, 2025
by
qiuqunfeng
Browse files
debug
parent
b9c63b91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
cmd/app/config.go
cmd/app/config.go
+1
-0
db/migrations/create_waf_tables.sql
db/migrations/create_waf_tables.sql
+2
-1
No files found.
cmd/app/config.go
View file @
b56b4505
...
@@ -62,6 +62,7 @@ func LoadConfig() *Config {
...
@@ -62,6 +62,7 @@ func LoadConfig() *Config {
log
.
Err
(
err
)
.
Msg
(
"Failed to parse config file"
)
log
.
Err
(
err
)
.
Msg
(
"Failed to parse config file"
)
return
nil
return
nil
}
}
log
.
Info
()
.
Msgf
(
"config password: %s"
,
config
.
DBConfig
.
Password
)
password
:=
os
.
Getenv
(
"RDB_PASSWORD"
)
password
:=
os
.
Getenv
(
"RDB_PASSWORD"
)
log
.
Info
()
.
Msgf
(
"RDB_PASSWORD: %s"
,
password
)
log
.
Info
()
.
Msgf
(
"RDB_PASSWORD: %s"
,
password
)
if
password
!=
""
{
if
password
!=
""
{
...
...
db/migrations/create_waf_tables.sql
View file @
b56b4505
...
@@ -45,6 +45,7 @@ CREATE TABLE waf_rule_categories (
...
@@ -45,6 +45,7 @@ CREATE TABLE waf_rule_categories (
-- hosts TEXT
-- hosts TEXT
-- );
-- );
-- Create waf_listener_histories table
CREATE
TABLE
`waf_listener_histories`
(
CREATE
TABLE
`waf_listener_histories`
(
`id`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`id`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
,
`created_at`
timestamp
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`created_at`
timestamp
NULL
DEFAULT
CURRENT_TIMESTAMP
,
...
@@ -60,7 +61,7 @@ CREATE TABLE `waf_listener_histories` (
...
@@ -60,7 +61,7 @@ CREATE TABLE `waf_listener_histories` (
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
;
-- Create waf_blackwhitelists table
CREATE
TABLE
IF
NOT
EXISTS
waf_blackwhitelists
CREATE
TABLE
IF
NOT
EXISTS
waf_blackwhitelists
(
(
id
bigint
NOT
NULL
PRIMARY
KEY
AUTO_INCREMENT
,
id
bigint
NOT
NULL
PRIMARY
KEY
AUTO_INCREMENT
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment