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
Return 404 for everything we don't know #10996
Merged
zmstone
merged 1 commit into
emqx:master
from
sstrigler:EMQX-9435-request-the-non-existent-api-v-4-nodes-endpoint-in-emqx-e-5-0-1-returns-http-code-200
Jun 10, 2023
Merged
Return 404 for everything we don't know #10996
zmstone
merged 1 commit into
emqx:master
from
sstrigler:EMQX-9435-request-the-non-existent-api-v-4-nodes-endpoint-in-emqx-e-5-0-1-returns-http-code-200
Jun 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ieQu1
reviewed
Jun 9, 2023
ct_body(<<"text/plain">>) -> | ||
<<"404 - NOT FOUND">>; | ||
ct_body(<<"application/json">>) -> | ||
<<"{\"code\": \"API_NOT_EXIST\", \"message\": \"Request Path Not Found\"}">>. |
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.
Better grammar:
Suggested change
<<"{\"code\": \"API_NOT_EXIST\", \"message\": \"Request Path Not Found\"}">>. | |
<<"{\"code\": \"NOT_FOUND\", \"message\": \"Request Path Not Found\"}">>. |
ieQu1
previously approved these changes
Jun 9, 2023
sstrigler
force-pushed
the
EMQX-9435-request-the-non-existent-api-v-4-nodes-endpoint-in-emqx-e-5-0-1-returns-http-code-200
branch
3 times, most recently
from
June 9, 2023 13:47
0dafd18
to
30cceef
Compare
kjellwinblad
approved these changes
Jun 9, 2023
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
zmstone
approved these changes
Jun 9, 2023
sstrigler
force-pushed
the
EMQX-9435-request-the-non-existent-api-v-4-nodes-endpoint-in-emqx-e-5-0-1-returns-http-code-200
branch
from
June 9, 2023 15:13
30cceef
to
8c1334c
Compare
zmstone
approved these changes
Jun 10, 2023
Bug Fixes
|
修复
|
sstrigler
deleted the
EMQX-9435-request-the-non-existent-api-v-4-nodes-endpoint-in-emqx-e-5-0-1-returns-http-code-200
branch
October 25, 2023 08:47
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes EMQX-9435
Summary
🤖 Generated by Copilot at b561dc6
Removed the
emqx_dashboard_swagger
handler and improved theemqx_dashboard_404
handler and its test module. This change enhances the security and usability of the dashboard by hiding the swagger API documentation and providing different 404 responses based on the request content type.PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md
filesIf there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow upSchema changes are backward compatible