Sha256: 33d158f937cc09739cb2fcb9a86cb62bbbcc2b69ec55916bdfebb5a97ab8575f
Contents?: true
Size: 505 Bytes
Versions: 11
Compression:
Stored size: 505 Bytes
Contents
class CustomResponseController < ApplicationController skip_before_action :verify_authenticity_token def make_response response_args_json = params[:response] raise ActionController::BadRequest unless response_args_json (response_args_json[:headers] || {}).each do |name, value| response.headers[name] = value end render inline: response_args_json[:body], status: response_args_json[:status], content_type: response_args_json[:content_type] end end
Version data entries
11 entries across 11 versions & 1 rubygems