Sha256: b3111f0babfc7128db53b8e286971337907192bcd93cba1b3ad7c185ec6913f9
Contents?: true
Size: 712 Bytes
Versions: 59
Compression:
Stored size: 712 Bytes
Contents
require File.expand_path('../spec_helper.rb', __FILE__) describe Rack::Protection::FrameOptions do it_behaves_like "any rack application" it 'should set the X-XSS-Protection' do get('/').headers["X-Frame-Options"].should == "sameorigin" end it 'should allow changing the protection mode' do # I have no clue what other modes are available mock_app do use Rack::Protection::FrameOptions, :frame_options => :deny run DummyApp end get('/').headers["X-Frame-Options"].should == "deny" end it 'should not override the header if already set' do mock_app with_headers("X-Frame-Options" => "allow") get('/').headers["X-Frame-Options"].should == "allow" end end
Version data entries
59 entries across 59 versions & 4 rubygems