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
Update Content-Type for login request #7253
Conversation
const getHeaders = (urlEncoded?: boolean): Partial<AxiosHeaders> => { | ||
if (apiProxy || urlEncoded) { |
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.
It looks like this leaves off ...loginHeaders
. Should those be included for both content types?
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've thought that loginHeaders contain the login information (Once logged in), but let me verify
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.
Updated
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'm wondering if OSSMC should also have those login headers? @ferhoyos?
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 don't think so, as OSSMC leverages of Openshift login. Where loginHeaders 'X-Auth-Type-Kiali-UI': '1'
is used?
Said that, including loginHeaders probably do not affect OSSMC. Maybe you can simplify the code:
if (apiProxy || urlEncoded) {
return { 'Content-Type': 'application/x-www-form-urlencoded', ...loginHeaders };
} else {
return { 'Content-Type': 'application/json', ...loginHeaders };
}
* Update encoding for login requests
Fixes #7252