You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: base_controller.rb
    path of file: ./repos/siwapp-ror/app/controllers/api/v1
    
    the code of the file until where you have to start completion: class Api::V1::BaseController < ApplicationController

#  force_ssl unless: proc { Rails.env.development? || Rails.env.testing? }
  protect_from_forgery with: :null_session

  before_action :destroy_session

  rescue_from Exception, with: :render_error # any error? go to handler!

  def default_url_options(options = {})
    options
  end

  protected
    
  def self.set_pagination_headers(name, options = {})
    after_action(options) do |controller|
      results = instance_variable_get("@#{name}")
      headers["X-Pagination"] = {
        total: results.total_entries,
        total_pages: results.total_pages,
        first_page: results.current_page == 1,
        last_page: results.next_page.blank?,
        previous_page: results.previous_page,
        next_page: results.next_page,
        out_of_bounds: results.out_of_bounds?,
        offset: results.offset
      }.to_json
    end
  end