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
S
speech_nlu_parse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵文静
speech_nlu_parse
Commits
dfed18fe
Commit
dfed18fe
authored
Jun 25, 2025
by
赵文静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加AppKey
parent
a4b760ec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
conf/config.yaml
conf/config.yaml
+1
-0
pkg/consul/register.go
pkg/consul/register.go
+1
-0
router/router.go
router/router.go
+1
-1
No files found.
conf/config.yaml
View file @
dfed18fe
...
...
@@ -8,6 +8,7 @@ Server:
Interval
:
10
#健康检查间隔,单位:秒
Deregister
:
1
#注销时间,相当于过期时间,单位:分钟
UriPath
:
/semantic/unisoundc2c/speech-nlu-parse
AppKey
:
391b50b5ed634fc49a3db7cfd6bc40db
RabbitMq
:
Url
:
amqp://iot:qwe!23@172.28.124.106:5672/voice
...
...
pkg/consul/register.go
View file @
dfed18fe
...
...
@@ -19,6 +19,7 @@ type ConsulSettingS struct {
Interval
time
.
Duration
Deregister
time
.
Duration
UriPath
string
AppKey
string
}
func
RegisterService
(
cs
*
ConsulSettingS
)
error
{
...
...
router/router.go
View file @
dfed18fe
...
...
@@ -92,7 +92,7 @@ func SpeechNluParseSemanticRequest(req SnpReq) *model.SemanticReq {
// 校验AppKey
func
VerifyAppKeyMiddleware
()
gin
.
HandlerFunc
{
validAppKeys
:=
map
[
string
]
bool
{
"391b50b5ed634fc49a3db7cfd6bc40db"
:
true
,
global
.
ServerSetting
.
AppKey
:
true
,
}
return
func
(
c
*
gin
.
Context
)
{
...
...
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