Module: SpammableActions::CaptchaCheck::JsonFormatActionsSupport
- Extended by:
- ActiveSupport::Concern
- Included in:
- IssuableActions
- Defined in:
- app/controllers/concerns/spammable_actions/captcha_check/json_format_actions_support.rb
Overview
This module should be included to support forms submits with a ‘js’ or ‘json’ type of MIME type. In other words, forms handled by actions which use a ‘respond_to` of `format.js` or `format.json`.
For example, for all Javascript based form submissions and Vue components which use Apollo and Axios which are directly handled by a controller other than ‘GraphqlController`. For example, issue update currently uses this module.
However, requests which directly hit ‘GraphqlController` will not use this module - the `Mutations::SpamProtection` module handles those requests (for example, snippet create/update requests)
If the request is handled by actions via ‘format.html`, then the corresponding module which supports HTML format should be used instead.