EricGao888 commented on code in PR #13164:
URL:
https://github.com/apache/dolphinscheduler/pull/13164#discussion_r1048127023
##########
dolphinscheduler-ui/src/service/service.ts:
##########
@@ -74,9 +74,12 @@ const err = (err: AxiosError): Promise<AxiosError> => {
service.interceptors.request.use((config: AxiosRequestConfig<any>) => {
config.headers && (config.headers.sessionId = userStore.getSessionId)
const language = cookies.get('language')
+ const sessionId = cookies.get('sessionId')
config.headers = config.headers || {}
if (language) config.headers.language = language
-
+ if (sessionId) {
+ config.headers['X-CSRF-TOKEN'] = sessionId.split('').reverse().join('')
Review Comment:
Currently, you invert the sessionId to get a `CSRF` token and put it in
headers in front-end. As you wrote in PR change log, you plan to encrypt it in
the future, may I ask where and how you plan to encrypt it?
--
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]