-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fix healthcheck path #2295
Fix healthcheck path #2295
Conversation
eae2d86
to
435fcbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emilevauge Well done 😉
Just a question.
configuration/configuration.go
Outdated
} | ||
if gc.Web.Path[len(gc.Web.Path)-1:] != "/" { | ||
gc.Web.Path += "/" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can not use a single if block ?
if gc.Web.Path == "" || gc.Web.Path[len(gc.Web.Path)-1:] != "/" {
gc.Web.Path += "/"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few comments
configuration/configuration.go
Outdated
gc.LogLevel = "DEBUG" | ||
} | ||
if gc.Web != nil { | ||
if gc.Web.Path == "" || gc.Web.Path[len(gc.Web.Path)-1:] != "/" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gc.Web.Path[len(gc.Web.Path)-1:] != "/"
can be replace by a !strings.HasSuffix(gc.Web.Path, "/")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2 if can be merged:
if gc.Web != nil && (gc.Web.Path == "" || !strings.HasSuffix(gc.Web.Path, "/")) {
gc.Web.Path += "/"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Emile Vauge <[email protected]>
Signed-off-by: Emile Vauge <[email protected]>
Signed-off-by: Emile Vauge <[email protected]>
f5d85ef
to
4e4b747
Compare
Description
This PR fixes healthcheck path.
Fixes #2273