mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
8e77ada424
[web] add cookie/JWE based device history for skipping captcha challenge GitOrigin-RevId: b091564bfd93f7e587d396c860fd864f220f4b63
22 lines
458 B
JavaScript
22 lines
458 B
JavaScript
const AbstractMockApi = require('./AbstractMockApi')
|
|
|
|
class MockReCaptchaApi extends AbstractMockApi {
|
|
applyRoutes() {
|
|
this.app.post('/recaptcha/api/siteverify', (req, res) => {
|
|
res.json({
|
|
success: req.body.response === 'valid',
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
module.exports = MockReCaptchaApi
|
|
|
|
// type hint for the inherited `instance` method
|
|
/**
|
|
* @function instance
|
|
* @memberOf MockReCaptchaApi
|
|
* @static
|
|
* @returns {MockReCaptchaApi}
|
|
*/
|