related tags: disable csrf protection for update action.
This fixes InvalidAuthenticityToken errors caused by Reportbooru trying to use this endpoint to update related tags. Reportbooru uses a secret key to authenticate rather than using apikey-based authentication, which makes it fail the CSRF protection.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class RelatedTagsController < ApplicationController
|
||||
respond_to :json, :xml, :js, :html, except: [:update]
|
||||
before_action :require_reportbooru_key, only: [:update]
|
||||
skip_forgery_protection only: [:update]
|
||||
|
||||
def show
|
||||
@query = RelatedTagQuery.new(query: params[:query], category: params[:category], user: CurrentUser.user)
|
||||
|
||||
Reference in New Issue
Block a user