sudo87 commented on code in PR #14054:
URL: https://github.com/apache/cloudstack/pull/14054#discussion_r4214632026
##########
ui/src/utils/request.js:
##########
@@ -51,7 +51,9 @@ const err = (error) => {
})
}
if (response.status === 401) {
- if (response.config && response.config.params && ['forgotPassword',
'listIdps', 'cloudianIsEnabled'].includes(response.config.params.command)) {
+ const requestCommand = (response.config && response.config.params &&
response.config.params.command) ||
+ (response.config && typeof response.config.data === 'string' && new
URLSearchParams(response.config.data).get('command'))
+ if (['forgotPassword', 'listIdps',
'cloudianIsEnabled'].includes(requestCommand)) {
Review Comment:
I don't think this one applies. axios turns a URLSearchParams body into a
string before sending, so config.data is already a string by the time the 401
handler runs. I tested forgotPassword, listIdps and cloudianIsEnabled POSTs
against a live backend, and the command was picked up and skipped correctly
each time.
--
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]