Skip to content

Commit

Permalink
Updates for Nginx role changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsche committed Jul 26, 2019
1 parent b881fd0 commit 85d980f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ tmtags
*.log
/roles/*
/config.yml
__pycache__
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end
namespace :init do
desc "Symbolic link files and templates into the spec/playbooks directory"
task :links do
["files", "library", "templates"].each do |f|
["files", "library", "templates", "filter_plugins"].each do |f|
path = "spec/playbooks/#{f}"
next if File.symlink? path or !File.exist? f
raise "File #{path} exists and is not a symlink! Don't know what to do" if File.exist? path
Expand Down
1 change: 1 addition & 0 deletions spec/playbooks/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
files
filter_plugins
library
templates
6 changes: 3 additions & 3 deletions spec/shared/nginx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
end

it "disallows other sites from embedding in a frame" do
expect(subject.stdout.gsub(/\r/, '')).to match /^X-Frame-Options: DENY$/i
expect(subject.stdout.gsub(/\r/, '')).to match /^X-Frame-Options: SAMEORIGIN$/i
end

it "disallows content type sniffing" do
Expand All @@ -60,8 +60,8 @@
expect(subject.stdout.gsub(/\r/, '')).to match /^X-XSS-Protection: 1; mode=block$/i
end

it "disables cache transforms" do
expect(subject.stdout.gsub(/\r/, '')).to match /^Cache-Control: no-transform$/i
it "uses a secure referrer policy" do
expect(subject.stdout.gsub(/\r/, '')).to match /^Referrer-Policy: strict-origin-when-cross-origin$/i
end
end

Expand Down

0 comments on commit 85d980f

Please sign in to comment.