mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Skip CSRF check for POST /categories/search (#29392)
This endpoint used to be a GET request, but was changed to POST to allow
larger payloads.
Follow up to commit ebc1763aa5.
This commit is contained in:
@@ -18,6 +18,7 @@ class CategoriesController < ApplicationController
|
||||
before_action :fetch_category, only: %i[show update destroy visible_groups]
|
||||
before_action :initialize_staff_action_logger, only: %i[create update destroy]
|
||||
skip_before_action :check_xhr, only: %i[index categories_and_latest categories_and_top redirect]
|
||||
skip_before_action :verify_authenticity_token, only: %i[search]
|
||||
|
||||
SYMMETRICAL_CATEGORIES_TO_TOPICS_FACTOR = 1.5
|
||||
MIN_CATEGORIES_TOPICS = 5
|
||||
|
||||
Reference in New Issue
Block a user