Sha256: 25326573da968391a45f83f3449eafc498fc38b91942913cd71f0fdfff88fe6f

Contents?: true

Size: 398 Bytes

Versions: 8

Compression:

Stored size: 398 Bytes

Contents

module Upjs
  module Rails
    module RequestEchoHeaders

      def self.included(base)
        base.before_filter :set_up_request_echo_headers
      end

      private
      
      def set_up_request_echo_headers
        headers['X-Up-Location'] = request.original_url
        headers['X-Up-Method'] = request.method
      end

      ActionController::Base.send(:include, self)

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
upjs-rails-0.12.5 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.12.4 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.12.3 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.12.2 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.12.1 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.12.0 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.11.1 lib/upjs/rails/request_echo_headers.rb
upjs-rails-0.11.0 lib/upjs/rails/request_echo_headers.rb