-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
feat: add check endpoints that do not mirror status code #853
Conversation
internal/check/handler.go
Outdated
@@ -70,7 +73,7 @@ type getCheckRequest struct { | |||
MaxDepth int `json:"max-depth"` | |||
} | |||
|
|||
// swagger:route GET /check read getCheck | |||
// swagger:route GET /check-sdk read getCheck |
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.
Would it make sense to use a query parameter instead? For example alwaysSend200=true
? And I would suggest to keep the response payload the same between the two variants.
Alternatively it could be /check/<method>
or /allowed/<method>
where <method>
could be for example openapi
or envoy
, traefik
, ...
WDYT?
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.
Alternatively it could be /check/ or /allowed/ where could be for example openapi or envoy, traefik, ...
Makes sense 👍
The problem with query parameter is that no status should be default for SDK, but not default for others.
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.
Ah, that makes sense yeah. Another option is to use the user-agent, however I think that is not strict enough for security purposes.
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.
I think you had a good point there 😉 #851 (comment)
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.
Agreed :)
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.
Changed to check/openapi
.
4ce02ef
to
d52c3bb
Compare
70788b5
to
422a8ec
Compare
422a8ec
to
9b89f20
Compare
For now we have both check variants as part of the openapi spec. Ideally we would expose both on the docs page, but exclude the status mirroring endpoints from the SDK clients. I am not sure yet where to do that. |
closes #851
Naming should be improved,
/check-sdk
is probably not as helpful.