Sha256: c10a82ba0f77638c7fabb63d60b72c7ea8c220966f88046db52bc6fe6fa3d642

Contents?: true

Size: 399 Bytes

Versions: 9

Compression:

Stored size: 399 Bytes

Contents

class OtherThingsController < ApplicationController
  ensure_security_headers :csp => {:default_src => "'self'"}
  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

9 entries across 9 versions & 1 rubygems

Version Path
secure_headers-2.5.3 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.5.2 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.5.1 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.5.0 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.4.4 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.4.3 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.4.2 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.4.1 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb
secure_headers-2.4.0 fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb