Sha256: 2a5930eff9c164524b878c3bca5577d35915379bf282e01f0e821697beefc061

Contents?: true

Size: 426 Bytes

Versions: 4

Compression:

Stored size: 426 Bytes

Contents

class OtherThingsController < ApplicationController
  ensure_security_headers :csp => {:default_src => 'self', :disable_fill_missing => true}
  def index

  end

  def other_action
    render :text => 'yooooo'
  end

  def secure_header_options_for(header, options)
    if params[:action] == "other_action"
      if header == :csp
        options.merge(:style_src => 'self')
      end
    else
      options
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
secure_headers-2.3.0 fixtures/rails_3_2_12_no_init/app/controllers/other_things_controller.rb
secure_headers-2.2.4 fixtures/rails_3_2_12_no_init/app/controllers/other_things_controller.rb
secure_headers-2.2.3 fixtures/rails_3_2_12_no_init/app/controllers/other_things_controller.rb
secure_headers-2.2.2 fixtures/rails_3_2_12_no_init/app/controllers/other_things_controller.rb