Duansg commented on PR #4276:
URL: https://github.com/apache/hertzbeat/pull/4276#issuecomment-5231117756
/swagger-ui/index.html is still served anonymously by the existing
/**/*.html===get exclusion, but the page fetches /v3/api-docs/swagger-config
and /v3/api-docs without an Authorization header — swagger-ui's Authorize
button only applies to try-it-out calls, not to the spec fetch. The UI will
therefore show "Failed to load API definition" for everyone, including admins.
The document itself remains reachable for an admin with a token:
curl -H "Authorization: Bearer $JWT" http://localhost:1157/v3/api-docs
If the community would rather not ship a UI page that cannot load, the
follow-up is to set springdoc.api-docs.enabled / springdoc.swagger-ui.enabled
to false by default and let deployments opt in; that is a product decision kept
out of this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]