Skip to content

Commit

Permalink
refactor(http.go): replace hardcoded "remote" string with the AppID f…
Browse files Browse the repository at this point in the history
…rom the configuration file to improve semantics and readability

test(test.http): update the test request to use the new AppID-based URL instead of the hardcoded "remote" string
  • Loading branch information
shumkovdenis committed May 11, 2023
1 parent a43bef8 commit 3a342a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion services/gateway/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewHTTPServer(cfg Config) error {
client := req.C().
SetBaseURL(fmt.Sprintf("http://localhost:%d", cfg.Dapr.HTTPPort)).
WrapRoundTripFunc(
helpers.NewClientAppMiddleware("remote"),
helpers.NewClientAppMiddleware(cfg.Integration.AppID),
helpers.NewClientTraceMiddleware(),
helpers.NewClientLoggerMiddleware(),
)
Expand Down
5 changes: 5 additions & 0 deletions test.http
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ Content-Type: {{contentType}}
"token": "{{token}}"
}

###

# @name gateway
POST {{remote}}/gateway HTTP/1.1
Content-Type: {{contentType}}

0 comments on commit 3a342a3

Please sign in to comment.