With !53941 (merged) we introduced an axios interceptor to handle Captchas in case potential SPAM is detected: !53941 (merged) Currently it still manipulates the data when retrying the request and needs to be registered locally.
With !56879 (merged) we created a global "interceptor" for a similar kind of Captcha handling for GraphQL requests. It is globally registered and uses headers instead of manipulating the data.
That Apollo based interceptor/link was then used to create a new spam protection concern, to be usable in GraphQL mutations: !56190 (merged)
Thus, this MR refactor the axios interceptor to:
apolloCaptchaLink
(1)
apolloCaptchaLink
(2)
apolloCaptchaLink
(3) (this was already the case)See also the documentation for Axios interceptors:
This MR also includes removal of logic around issue update passing spam params (captcha response and spam log ID) as params, since it will now automatically pass them as headers. The only remaining legacy usage of passing them via params is in issue create.
No screenshots, it's just normal CAPTCHA behavior, but see the testing section below for details on how to test CAPTCHAs locally.
See the testing section of the CAPTCHA epic for detailed instructions on how to test spam/CAPTCHA in a dev environment.