-
Notifications
You must be signed in to change notification settings - Fork 47
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: admin REST API to be enabled only if config is set #2218
Conversation
You can find the image built from this PR at
Built from b22cdc4 |
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 have some generic thoughts on this PR.
One littel, and yes it is a general notice to myself also as me also running into this time-to-time. It is better avoid general formatting changes when having a fix PR. Maybe you have some auto-formatting enabled, idk. But it makes harder to find and review the meaningful change.
On the topic of the PR.
I think this change is opposed to #2137
Also it might be my fault and did not checked with enough care those cli switches, but did not expect that for a generic endpoint like admin (and health, debug, ...) we need such distinction. It is ok that some endpoint not mounted as the underlying feature not present (lightpush, filter,...).
So I think in general we can have /admin by default if having --rest=true.
@jm-clius , @fryorcraken : WDYT?
Sorry, did not realise my IDE did all changes. |
|
I have no opinion on the matter as we are yet to understand how node operator would (or would not) use the REST API. |
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.
Thanks for submitting this @chaitanyaprem !
Just asking for changes to reduce its scope and avoid the automatic IDE changes.
From my point of view I think is fine to have the admin
enabled by default. Although I understand this PR is aimed to allow disabling it if needed.
Thanks again, and I'll re-check once the PR is simplified.
Cheers
02c5536
to
fa64f08
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.
LGTM! Thanks so much indeed!
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, thank you!
Description
Admin REST API was enabled even if restadmin flag was set to false.
Note: Tested by running node locally and enabling/disabling the config flag to verify the availability of Admin REST API.
Changes