jerryshao commented on code in PR #14958:
URL: https://github.com/apache/gravitino/pull/14958#discussion_r4560237126
##########
web-v2/web/src/lib/api/auth/index.js:
##########
@@ -21,9 +21,12 @@ import { defHttp } from '@/lib/utils/axios'
import { ContentTypeEnum } from '@/lib/enums/httpEnum'
export const getAuthConfigsApi = () => {
- return defHttp.get({
- url: '/configs'
- })
+ return defHttp.get(
+ {
+ url: '/configs'
+ },
+ { withToken: false }
Review Comment:
The withToken: false option is redundant now that the interceptor
special-cases /configs, and the simple-auth branch ignores that flag anyway.
Pick one mechanism (ideally make the interceptor honor withToken in every
branch) so the intent lives in one place.
##########
web-v2/web/src/lib/utils/axios/index.js:
##########
@@ -175,6 +175,12 @@ const transform = {
requestInterceptors: async (config, options) => {
// ** Pre-Request Configuration Handling
+ if (config.url === '/configs') {
Review Comment:
Exact match on config.url === '/configs' breaks silently if the URL gets a
prefix, query string or different base path. Consider keying off
requestOptions.withToken === false here instead of a hardcoded URL.
--
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]